SQL_ATTR_ASYNC_ENABLEA 32-bit integer value that specifies whether a function called with the specified statement is executed asynchronously:
- SQL_ASYNC_ENABLE_OFF = Off (the default)
- SQL_ASYNC_ENABLE_ON = On
After a function has been called asynchronously, only the original function, SQLAllocHandle(), SQLCancel(), SQLSetStmtAttr(), SQLGetDiagField(), SQLGetDiagRec(), or SQLGetFunctions() can be called on the statement handle, until the original function returns a code other than SQL_STILL_EXECUTING. Any other function called on any other statement handle under the same connection returns SQL_ERROR with an SQLSTATE of HY010 (Function sequence error).
Because CLI supports statement level asynchronous-execution, the statement attribute SQL_ATTR_ASYNC_ENABLE can be set. Its initial value is the same as the value of the connection level attribute with the same name at the time the statement handle was allocated.