19.3.1 a_rdb_SQLCancel() (cancel SQL processing)
- Organization of this subsection
(1) Function
This CLI function cancels the current SQL processing. The following SQL processing (CLI functions) can be canceled by a_rdb_SQLCancel():
-
a_rdb_SQLCloseCursor()
-
a_rdb_SQLExecDirect()
-
a_rdb_SQLExecute()
-
a_rdb_SQLFetch()
-
a_rdb_SQLPrepare()
If you execute a_rdb_SQLCancel() during execution of a CLI function other than the preceding ones, a_rdb_SQLCancel() terminates normally.
(2) Format
signed short a_rdb_SQLCancel ( void *ConnectionHandle, /* In */ void *Option /* In */ )
(3) Arguments
- ConnectionHandle
-
Specifies a connection handle.
- Option
-
Specifies NULL.
(4) Return value
If a_rdb_SQLCancel() terminates normally, a_rdb_RC_SQL_SUCCESS is returned.
(5) Notes
-
You must execute a_rdb_SQLCancel() in a different thread from the one used for the SQL processing.
-
Execution of a_rdb_SQLCancel() does not set any SQL results information.
-
If a_rdb_SQLCancel() results in an error, no message is output to the client message log files.
-
When SQL processing is canceled successfully, the canceled SQL processing is rolled back and SQLCODE is returned.
-
Normal termination of a_rdb_SQLCancel() does not mean that cancellation has been successful, because the cancellation processing is performed asynchronously with a_rdb_SQLCancel().
-
a_rdb_SQLCancel() cannot be executed if connection has not been established.