19.4.11 a_rdb_SQLFreeStmt() (release a statement handle)
- Organization of this subsection
(1) Function
This CLI function releases a statement handle allocated by a_rdb_SQLAllocStmt().
When a statement handle is released, any open cursor is also closed.
(2) Format
signed short a_rdb_SQLFreeStmt ( void *ConnectionHandle, /* In */ void *StatementHandle, /* In */ void *Option /* In */ )
(3) Arguments
- ConnectionHandle
-
Specifies a connection handle.
- StatementHandle
-
Specifies a statement handle.
- Option
-
Specifies NULL.
(4) Return value
-
If a_rdb_SQLFreeStmt() terminates normally, a_rdb_RC_SQL_SUCCESS is returned.
-
If the statement handle is released successfully, but the disk containing server message log files or client message log files has become full, a_rdb_RC_SQL_WARNING is returned.
-
If an error occurs while messages cannot be output to the client message log file, the error cause code is returned. For details about the error cause code, see 19.8 Return values of the CLI functions.
(5) Notes
a_rdb_SQLFreeStmt() cannot be executed in the following cases:
-
Connection has not been established.
-
An invalid statement handle is specified.
-
A row fetching error is detected during the cursor close processing that is executed as an extension of the statement handle release processing.