Strange error code for deadlock
From: Julien Lauper (Julien.lauper_at_example.com)
Date: 08/10/04
- Next message: ftec: "AppendChunk and clearing the binary field"
- Previous message: Jeth: "autonumber"
- Next in thread: Val Mazur: "Re: Strange error code for deadlock"
- Reply: Val Mazur: "Re: Strange error code for deadlock"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 10 Aug 2004 13:19:20 +0200
Hello,
I am currently writing an deadlock handler for our application (a COM
DLL calling a SQL Server 2000 database.)
Having searched both ADO and SQL Server references, I believe that the
correct means to catch this error is to iterate through the "Errors"
collection of the "Connection" object, looking for the value 1205 in
"NativeError" field.
Unfortunately, I don't find this value. The error that I find has the
following characteristics:
Description: "Transaction (Process ID 55) was deadlocked on {lock}
resources with another process and has been chosen as the deadlock
victim. Rerun the transaction."
NativeError: -2147467259 (Hex: 80004005)
Error: 265946
SQLState: (Nothing)
SQLSource: Microsoft OLE DB Provider for SQL Server
As you can see there is a quick and dirty workaround (analysing the
error message to find "deadlock victim" for example); nevertheless I
would like to know why the NativeError does not behave as it should (or
as I expect - I might be wrong).
Any idea?
Many thanks in advance
Julien Lauper
-- My real address is at eads hyph. telecom dot com.
- Next message: ftec: "AppendChunk and clearing the binary field"
- Previous message: Jeth: "autonumber"
- Next in thread: Val Mazur: "Re: Strange error code for deadlock"
- Reply: Val Mazur: "Re: Strange error code for deadlock"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|