Strange Deadlock behaviour


2004-10-07 03:37:06 PM
delphi60
I am using D5, ADO and SQL Server 2000.
I have a fairly simple SP that inserts a single record into a table.
It seems that sometimes when a deadlock occurs, the SP is exited immediatley
and the ADOCommand component throws an exception. Yet on some other
occasions it appears that the SP completed correctly, not exception is
thrown by the ADOCommand componet but the return value from the Sp is 1205.
(I am checking the @@Error variable after each statement in the SP)
This seems very inconsistent. Is this normal? Am I missing something here?
My retry on deadlock is only coded to work if the ADOCommand throws an
expection.
Thanks for any help. I am very confused and a bit worried by this.
Matthew