The mi_lo_colinfo_by_name() function
The mi_lo_colinfo_by_name() function sets the fields of an LO-specification structure to the column-level storage characteristics for a specified database column.
Syntax
mi_integer mi_lo_colinfo_by_name(conn, column_spec, LO_spec)
MI_CONNECTION *conn;
const char *column_spec;
MI_LO_SPEC *LO_spec;
- conn
- This value is one of the following connection values:
A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
A NULL-valued pointer (database server only)
- column_spec
- A pointer to a buffer that contains the name of the database column whose column-level storage characteristics you want to use.
- LO_spec
- A pointer to the LO-specification structure into which mi_lo_colinfo_by_name() puts the storage characteristics for the column_spec column.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_lo_colinfo_by_name() function sets the fields of the LO-specification structure that LO_spec references to the storage characteristics for the column_spec database column. If this specified column does not have column-level storage characteristics defined for it, the database server uses the storage characteristics that are inherited.
database@server_name:table.column
- Full column specification:
emp_data@main_server:employee.resume
- Column specification that omits the server_name argument:
emp_data:employee.resume
The mi_lo_colinfo_by_name() function assumes that the employee table resides in the specified database that the current database server manages.
- Column specification that omits the database and server_name arguments:
employee.resume
The mi_lo_colinfo_by_name() function assumes that the employee table resides in the database that is currently open and that the current database server manages.
database@server_name:owner.table.column
Return values
- MI_OK
- The function was successful; LO_spec points to the LO-specification structure with the storage characteristics of column_spec.
- MI_ERROR
- The function was not successful.