The mi_get_statement_row_desc() function
The mi_get_statement_row_desc() function obtains the row descriptor for a prepared statement.
Syntax
MI_ROW_DESC *mi_get_statement_row_desc(stmt_desc)
MI_STATEMENT *stmt_desc;
- stmt_desc
- A pointer to the statement descriptor for the prepared statement.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_get_statement_row_desc() function obtains the row descriptor from the statement descriptor that stmt_desc references. This row descriptor contains information for the columns in the prepared statement. From this row descriptor, you can use the row-accessor functions to obtain information about the prepared-statement columns.
The
row descriptor is valid until one of the following conditions occurs:
- The query finishes.
- The mi_close() function is called on the connection.
Restriction: Do not use the mi_row_desc_free() function
to free the row descriptor that mi_get_statement_row_desc() allocates.
Use mi_row_desc_free() only for row descriptors
that you allocate with mi_row_desc_create().
Return values
- An MI_ROW_DESC pointer
- A pointer that corresponds to the input statement.
- NULL
- The function was not successful.