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 parameter.
SQLSetStmtAttr( command, SQL_ATTR_QUERY_TIMEOUT, (SQLPOINTER)&timeOut, NULL );
Test
I set a delay in the stored procedure for 15 seconds. The stored proc does indeed take just over 15 seconds to return.
WAITFOR DELAY '00:00:15'
Issue
The problem is that the stored procedure returns correctly, where I am expecting an error.
Any ideas?