Home | Previous Page | Next Page   Function Descriptions >

mi_drop_prepared_statement( )

The mi_drop_prepared_statement( ) function drops a previously prepared statement.

Syntax

mi_integer mi_drop_prepared_statement(stmt_desc)
   MI_STATEMENT *stmt_desc;
stmt_desc
is a pointer to a statement descriptor that references a previously prepared statement. --
Valid in Client LIBMI Application? Valid in User-Defined Routine?
Yes Yes

Usage

The mi_drop_prepared_statement( ) frees the statement descriptor that stmt_desc references. It is the destructor function for a statement descriptor. The mi_prepare( ) function prepares a statement and returns a statement descriptor for the prepared statement. If a cursor (implicit or explicit) is associated with the prepared statement, mi_drop_prepared_statement( ) also frees this cursor.

Important:
It is recommended that you explicitly free prepared statements with mi_drop_prepared_statement( ) once you no longer need them. Otherwise, these prepared statements remain until the associated session ends. To clear the cursor associated with a prepared statement instead of freeing the cursor, use the mi_close_statement( ) function.

Return Values

MI_OK
indicates that the function was successful.
MI_ERROR
indicates that the function was not successful.

Related Topics

See also the descriptions of mi_close_statement( ), mi_exec_prepared_statement( ), mi_open_prepared_statement( ), and mi_prepare( ).

Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]