Hitachi

Hitachi Advanced Database Application Development Guide


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():

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

  1. You must execute a_rdb_SQLCancel() in a different thread from the one used for the SQL processing.

  2. Execution of a_rdb_SQLCancel() does not set any SQL results information.

  3. If a_rdb_SQLCancel() results in an error, no message is output to the client message log files.

  4. When SQL processing is canceled successfully, the canceled SQL processing is rolled back and SQLCODE is returned.

  5. 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().

  6. a_rdb_SQLCancel() cannot be executed if connection has not been established.