informix
Informix DataBlade API Programmer's Manual
DataBlade API Function Descriptions

mi_close_statement()

The mi_close_statement() function closes a previously opened cursor.

Syntax

Usage

The mi_close_statement() function closes the cursor associated with the prepared statement that the stmt_desc statement descriptor describes. To close a cursor, mi_close_statement() clears out all rows from the cursor. A cursor must be closed before it can be opened again. When you close a cursor, you can reopen it with another call to the mi_open_prepared_statement() function. After the cursor is reopened it is empty.

Tip: When you free a prepared statement with mi_drop_prepared_statement(), the prepared statement and the associated cursor are deallocated. You must reprepare the statement with mi_prepare() to reopen the cursor.

Return Values

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

Related Topics

See the description of the following functions: mi_drop_prepared_statement(), mi_open_prepared_statement() and mi_prepare().


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved