The mi_get_row_desc_without_row() function
The mi_get_row_desc_without_row() function obtains the row descriptor for the current statement.
Syntax
MI_ROW_DESC *mi_get_row_desc_without_row(conn)
MI_CONNECTION *conn;
- conn
- A pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_get_row_desc_without_row() function obtains the row descriptor for the current statement on the connection that conn references. The current statement is the most recently executed SQL statement sent to the database server on that connection.
Use mi_get_row_desc_without_row() to obtain a row descriptor for a query when the current statement was sent with the mi_exec() function. The mi_get_row_desc_without_row() function is useful when all the rows that the query returns are of the same type or when the statement is expected to return row data but no rows qualified.
- The query finishes.
- The mi_close() function is called on the connection.
After you obtain a row descriptor for the current statement, you can obtain the number of columns in the row with the mi_column_count() function. The number of columns determines the number of times to call the mi_value() or mi_value_by_name() function to obtain column values.
Return values
- An MI_ROW_DESC pointer
- A pointer to the row descriptor for the last query that returned rows on the specified connection.
- NULL
- The function was not successful or if the current statement is not a statement that returns rows.