SQL_ATTR_QUERY_TIMEOUT Not Timing Out
Setup Using SQL Server 2008 R2. I have an ODBC call to a stored procedure that should time out after 3 seconds by using the SQLSetStmtAttr function with the SQL_ATTR_QUERY_TIMEOUT
Solution 1:
Issue discovered.
The timeOut variable (int) was passed into SQLSetStmtAttr as a reference, and the value of the reference location was much larger than 3.
Correct implementation is:
SQLSetStmtAttr( command, SQL_ATTR_QUERY_TIMEOUT, (SQLPOINTER)timeOut, NULL );
Post a Comment for "SQL_ATTR_QUERY_TIMEOUT Not Timing Out"