Core subroutine
Request cancellation of processing.
call EDSCancel(HSTMT_IV )
•HSTMT_IV An input integer value indicating the statement handle obtained from a call to EDSAllocStmt.
Description
If your application submits statements asynchronously, it can call EDSCancel. Otherwise, your application cannot call EDSCancel until any request in process is completed. If your application calls EDSCancel for a function called synchronously, EDSCancel has the same effect as EDSFreeStmt with the EDS_CLOSE option.
If the cancel request is successful, EDS returns EDS_SUCCESS. This message does not indicate that the SQL operation was actually cancelled; it indicates that the cancel request was processed.
EDSCancel preserves the statement handle and any error information buffered for EDSError.
Return Values
EDSCancel returns EDS_SUCCESS, EDS_INVALID_HANDLE, or EDS_ERROR.
When EDSCancel returns EDS_ERROR, you can obtain an associated SQLSTATE value with more specific information by calling EDSError. The following table lists each typical SQLSTATE value and explains each one in the context of the command EDSCancel.
The following table lists possible SQLSTATE values.
SQL STATE |
Error |
Description |
70100 |
Operation aborted |
The data source was unable to process the cancel request. |
IM001 |
Driver does not support this function |
The driver associated with the statement handle does not support the function. |
S1000 |
General error |
An error occurred for which there was no specific SQLSTATE and for which no implementation-specific SQLSTATE was defined. The error message returned by EDSError in the argument ERRORTEXT describes the error and its cause. |
S1001 |
Memory allocation failure |
The driver was unable to allocate memory required to support execution or completion of the function. |
See Also
EDSExecute and EDSExecDirect execute a statement.
EDSFreeStmt frees a statement handle and discards the results.