SQLCancel - Cancel statement

 

SQLCancel() is used to end the processing of an SQL statement operation that is running synchronously. To cancel the function, the application calls SQLCancel() with the same statement handle that is used by the target function, but on a different thread. How the function is canceled depends on the operating system.

 

Syntax

SQLRETURN SQLCancel (SQLHSTMT     hstmt);

 

Function arguments

Table 1. SQLCancel arguments
Data type Argument Use Description
SQLHSTMT hstmt Input Statement handle

 

Usage

A successful return code indicates that the implementation has accepted the cancel request; it does not ensure that the processing is cancelled.

 

Return codes

 

Diagnostics

Table 2. SQLCancel SQLSTATEs
SQLSTATE Description Explanation
HY009 * Argument value that is not valid hstmt is not a statement handle.

 

Restrictions

DB2® UDB CLI does not support asynchronous statement processing.

 

Parent topic:

DB2 UDB CLI functions