I am writing an app in VB and using SQL Server 2000 as the DBMS. I want to trap the deadlock error code 1205 in VB. Do I use the normal Err object in VB or the ADODB.Err objects in the connection object to trap it. eg
if ABS(Err.Number) = 1205 then
Dim Cn as ADODB.Connection
Dim ADOErr As ADODB.Error
For Each ADOErr In Cn.Errors
If Abs(ADOErr.Number) = 1205 Then
I am not in a position to test this before I install the app with the client, so I would appreciate any input from someone who has actually written code to handle this in a real app.