Simba Technologies
Simba Technologies

SimbaEngine X SDK 10.1.11
Developing Drivers for Data Stores Without SQL

Canceling Operations

Prior to ODBC 3.8, only statement operations could be cancel using SQLCancel. In ODBC 3.8 a new function called SQLCancelHandle was added that can cancel both statement and connection operations. Note that canceling a statement in 3.8 using SQLCancelHandle is identical to canceling it using SQLCancel.

SimbaEngine X SDK supports both SQLCancelHandle and SQLCancel. The implementations of DSIConnection and DSIStatement can handle and clear the cancel requests through the OnCancel and ClearCancel callbacks. The following table summarizes this functionality:





Invoked when SQLCancelHandle is called on the DSIConnection’s handle.

Invoked at the beginning of a connection related function that has the ability to be canceled.


Invoked when SQLCancelHandle or SQLCancel is called on the DSIStatement’s handle.

Invoked at the beginning of a statement function that has the ability to be canceled.

In OnCancel, the object can perform any cancellation logic such as setting flags to indicate that an operation should be canceled.

In ClearCancel, the object can clear any pending cancel notification (e.g. clear flags).