Informix Error -11065: Operation canceled.
Cause and resolution
Operation canceled.
This Informix CLI error code is the same as SQLSTATE value S1008. The following functions can return this error code: SQLAllocConnect(), SQLAllocStmt(), SQLBindCol(), SQLBindParameter(), SQLColumns(), SQLExecDirect(), SQLForeignKeys(), SQLGetData(), SQLGetInfo(), SQLNativeSql(), SQLParamData(), SQLPrepare(), SQLProcedureColumns(), SQLPutData(), SQLSetConnectOption(), SQLSetCursorName(), and SQLSetStmtOption().
Before the function could complete execution, a different thread called SQLCancel() for the statement handle. Fix your application logic.
For SQLParamData() and SQLPutData(), one of the following problems can also occur: (1) You called SQLExecute() or SQLExecDirect() for the statement handle and the function returned SQL_NEED_DATA, or (2) You called SQLCancel() before data was sent for all data-at-execution parameters or columns. Fix your application logic.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-11065 fires when a different thread cancels a function's execution before it completes —
per the official guidance, this is the same as SQLSTATE value S1008, returnable by a wide
range of CLI functions (SQLAllocConnect(), SQLAllocStmt(), SQLBindCol(),
SQLBindParameter(), SQLColumns(), SQLExecDirect(), SQLForeignKeys(),
SQLGetData(), SQLGetInfo(), SQLNativeSql(), SQLParamData(), SQLPrepare(),
SQLProcedureColumns(), SQLPutData(), SQLSetConnectOption(), SQLSetCursorName(), and
SQLSetStmtOption()).
- Another thread calling
SQLCancel()on the same statement before the function completed, per the official guidance — the direct, only cause.
Solutions / Resolution
- Review the application's multi-threaded cancel logic, per the official guidance's implication, to confirm the cancel was intentional.
Examples
N/A
No specific triggering statement is documented beyond a cross-thread cancel.
Diagnostic Checks
- Check whether another thread called
SQLCancel()on the same statement handle around the time of this error.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -11065 in this set yet.
A different thread canceled the function's execution before it completed — check for a
cross-thread SQLCancel() call.