SQLCloseCursor
SQLCloseCursor#
This closes cursor and discards the suspended results.
Syntax#
SQLRETURN SQLCloseCursor (
SQLHSTMT stmt);
Argument#
Data Type | Argument | In/Output | Description |
---|---|---|---|
SQLHSTMT | stmt | Input | Command handle |
Return Values#
SQL_SUCCESS
SQL_SUCCESS_WITH_INFO
SQL_INVALID_HANDLE
SQL_ERROR
Description#
This closes cursor and discards the suspended results.
This option has same functionality as using SQL_CLOSE option in SQLFreeStmt(). However, 240000 errors occur if cursor is not open in SQLCloseCorsor().
Diagnosis#
SQLSTATE | Description | Comment |
---|---|---|
HY000 | General Error | |
HY001 | Memory Allocation Error | This denotes to fail to allocate memory for handle. |
24000 | The state of cursor is incorrect | No cursor is opened in command handle. |
Related Function#
SQLFreeHandle