Transaction (Process ID 65) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
I need to be able to capture this in VB and be able to move on safely
Main Topics
Browse All TopicsHi there
In a vb .net app I'm sometimes getting an error because of a dead lock on the SQL server
I want to handle that in the best way to keep the progam moving on while handling the error
regards
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Your HMI interface coding standards should address this one, but basically they should say something like this:
All code that updates the database must check for errors from the database engine. If the error is locking related (such as this Deadlock error, lock timeouts, etc.) then any current transaction should be rolled back in the database, a user friendly message to the effect that the "system is too busy" should be displayed and the user advised to retry the update later. The data submitted by the user should be redisplayed to the user in exactly the form he/she originally submitted in (i.e. in all the appropriate form fields) so that all he/she need to do to "try again later" is just click the "submit" button (or whatever he needs to do to submit again).
What is your application "doing" in the database and how is it doing it?
Specifically :
Are you calling some stored procedure(s) or sending up a T-SQL statement?
Are you using transactions in your code (either via the t-sql syntax or the transactions class from the SQL library)?
This problem could be just about anything from a massive update across multiple tables that you are attempting to execute too quickly in a rapid fire sequence to a long running stored procedure to even something as simple as a table with a bad index that is taking too long to iterate over records.
Describe what you are doing in the database and how, and we can start to piece together what you are doing, what you want/need to do, and how to get you there.
Business Accounts
Answer for Membership
by: cognos79Posted on 2007-03-06 at 07:50:25ID: 18662439
what is the error message