I'm executing sql on MS SQL 2008 using ODBC's SQLExecute(). My code calls a stored procedure which becomes a deadlock victim. The server rollsback and the procedure is terminated, but SQLExecute() returns success.
The server trace logs clearly show the deadlock, but an ODBC trace has no sign of any problem. The deadlocks are expected since there is a lot of concurrency going on, but my application can't recover unless its told there was a problem.
Should the ODBC driver return an error here? The docs state that @@error should be set after a deadlock, but isn't it ODBC's responsibility to capture that info?