I use ODBC API to talk to SQL Server. If SQLExecDirect returns SQL_ERROR, I use SQLGetDiagRec to get information about the error. If SQLGetDiagRec returns a native error of 1222, you know it is a lock timeout. At this point, I'd like to get the object-id
of the object on which lock timed out. What is the easiest way to do that?
↧