skip to main content
Developing JDBC Applications : Threading : Cancelling Functions in Multithreaded Applications
 

Cancelling Functions in Multithreaded Applications

In a multithreaded application, a thread can use the cancel method to cancel a statement that is being executed by another thread.
When using the OpenAccess SDK SQL engine and the IP is checking for the cancel condition, cancel can interrupt the running statement.
When using a third-party SQL engine that does not support cancel, cancel will have no affect on the running statement.
In both cases, the cancel method returns SQL_SUCCESS. If the cancel method has been called from a different thread while a request is pending, the original statement will return SQL_ERROR with the error message Operation cancelled.