Hello,
I have a window-less VB application running as a SQL server job.
The application is very simple and it just picks up the blob file from
filesystem and inserts into the database. I am using SQL Server 2000
running on Windows server 2003 standard edition.
Most of the time my application works fine, but sometimes the
following error is thrown and then and the application terminates.
"Transaction (Process ID 56) was deadlocked on lock resources with
another process and has been chosen as the deadlock victim. Rerun the
transaction. Error Number : -2147467259."
I am unable to trace the problem. I have all the latest servicepacks
and updates installed on my system. Please help me on this.
Regards,
Anil K Gupta.Hi
There are a few chapters in the BOL about DEADLOCKs ,have you read them?
"Anil K. Gupta" <anylcumar@.gmail.com> wrote in message
news:2770ae9d.0504262034.14d69c91@.posting.google.com...
> Hello,
> I have a window-less VB application running as a SQL server job.
> The application is very simple and it just picks up the blob file from
> filesystem and inserts into the database. I am using SQL Server 2000
> running on Windows server 2003 standard edition.
> Most of the time my application works fine, but sometimes the
> following error is thrown and then and the application terminates.
> "Transaction (Process ID 56) was deadlocked on lock resources with
> another process and has been chosen as the deadlock victim. Rerun the
> transaction. Error Number : -2147467259."
> I am unable to trace the problem. I have all the latest servicepacks
> and updates installed on my system. Please help me on this.
> Regards,
> Anil K Gupta.|||As above +
Sounds like your VB code needs error trapping IE On Error GoTo ...
OR
Inline error checking where you check Err.Number after every statement of
significance. A good method is On error goto ... for general code blocks
that could produce an error and to use the inline checking for lines where
you expect you may get an error and handle it there and then specifically.
EG.
sub MyUpdater()
dim ....
On error goto MU_Error
... general code.
... avoid zero divides as always
... prevent preventable errors as always
... now for somethin error prone
On error resume next
err= 0
rs.Update
if err <> 0 then
.. error handler specific to the above.
end if
On error goto MU_Error
...
...
Exit sub
MU_Error:
msgbox "Error:" & err.description
... possibly log the error to a disc file so you can add specific handlers
end sub
"Anil K. Gupta" <anylcumar@.gmail.com> wrote in message
news:2770ae9d.0504262034.14d69c91@.posting.google.com...
> Hello,
> I have a window-less VB application running as a SQL server job.
> The application is very simple and it just picks up the blob file from
> filesystem and inserts into the database. I am using SQL Server 2000
> running on Windows server 2003 standard edition.
> Most of the time my application works fine, but sometimes the
> following error is thrown and then and the application terminates.
> "Transaction (Process ID 56) was deadlocked on lock resources with
> another process and has been chosen as the deadlock victim. Rerun the
> transaction. Error Number : -2147467259."
> I am unable to trace the problem. I hav
e all the latest servicepacks
> and updates installed on my system. Please help me on this.
> Regards,
> Anil K Gupta.
No comments:
Post a Comment