mi_string *mi_current_command_name(*conn) MI_CONNECTION *conn;
Valid in Client LIBMI Application? | Valid in User-Defined Routine? |
---|---|
No | Yes |
The mi_current_command_name( ) function returns the SQL statement name as a null-terminated string in memory that the function allocates with the current memory duration. This statement name is only the verb of the statement, not the entire statement syntax.
For example, suppose the following statement executes:
DELETE FROM customer WHERE customer_id = 1998;
The mi_current_command_name( ) function returns only the verb of this statement: delete.
The conn parameter is redundant when you call mi_current_command_name( ) within the context of a user-defined routine. This function is useful in a user-defined routine that needs to determine what kind of SQL statement invoked it.
See also the descriptions of mi_get_result( ), mi_result_command_name( ), and mi_statement_command_name( ).
For more information on how to call a C UDR with an SQL statement, see the IBM Informix: DataBlade API Programmer's Guide.