Access the columns
The mi_value() and mi_value_by_name() functions access the row structure for the current row. The current row is in the cursor that is associated with the current statement. Because a current statement is associated with a connection, you must pass a connection descriptor into mi_value() or mi_value_by_name() to identify the row to access.
These functions pass back the column value as an MI_DATUM value. The format of this value depends on whether the control mode for the query data is text or binary representation. Each of the DataBlade® API statement-execution functions indicates the control mode for query data.
To obtain this column value, your DataBlade®
API module
must perform the following steps:
- Declare a value buffer to hold the column value that mi_value() or mi_value_by_name() passes back.
- Obtain the column value from the value buffer, based on the value status that mi_value() or mi_value_by_name() returns.