ASP Error Message

Bob Schneider
Bob Schneider used Ask the Experts™
on
I have a custom error message page that emails me when an error is encountered by a visitor.  I am receiving following error message on some of the pages on my site, although to my knowledge it is not crashing the page for the end user???  Is that possible and how do I fix it?

[Microsoft][SQL Server Native Client 10.0][SQL Server]Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.

Thanks!!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Developer & EE Moderator
Fellow 2018
Most Valuable Expert 2013
Commented:
It sounds like multiple inserts are going on at the same time.

Does your database take a long time to do what it needs to do or do you have a bunch of loops or extracting more data fields then you need?  I just gave a response to somebody else about using getrows instead of do until rs.eof.

if not rs.eof then
     MyArray=rs.getrows()
end if
'close database

' now loop through the array

anything you can do to make it run faster especially if you are on a shared servicer or server with low memory/cpu.
Umar Topia.Net Full Stack Developer
Commented:
You can do the following to avoid deadlocks and locks on tables:

1) Replace Cursors with While Loops in SQL Server
2) Replace Temp Tables with Table Variables in Stored Procedures in SQL Server
Bob SchneiderCo-Owner

Author

Commented:
Padas, that was me that you gave the advice to.  I will try to implement that here.  Wasn't sure that the same solution would prevent this issue from happening.
Scott FellDeveloper & EE Moderator
Fellow 2018
Most Valuable Expert 2013

Commented:
Well I use it all the time  now!

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial