partial recordset returned after deadlock
- From: "msayther" <msayther@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 25 Jul 2005 14:39:06 -0700
I had a strange situation occur today. We have a VB6 application that
performs an overnight job. Part of this job involves a database call that
fetches a set of rows.
The fetch is in the form of a stored procedure that runs one select
statement (there is no explicit transaction used either). There was a
deadlock with process and this select was chosen as the deadlock victim.
The thing that caused me trouble however, was that the VB app that receives
this resultset registered an error (On Error Resume Next was set and an error
logging function was called that shows this deadlock error was detected by
the VB App.) and a partial recordset was returned (I believe - I don't have a
solid way to know for sure if all the records that would have been selected
at that time were selected, or if it only spat up part of the results it
should have)
The VB app then began a looping operation on this resultset, and made it
through 68 records, but went into an infinite loop on the 69th. (Thus sending
me 38,000 error emails until the process was manually killed.) For some
reason the program was unable to move to the next record. My assumption is
that since the data pull was interrupted by the deadlocking, some necessary
final bits of information did not come through, and it was this 'partial'
recordset that was responsible for the infinite loop.
So my questions are; can anyone confirm this guess on my part or has seen
anything like it before, and is there any way in VB6 to detect a 'broken'
recordset like this. We check the rs variable/object against eof and being
nothing and neither of those showed true at the time.
(SQL Server 2000, VB6 using ADO 2.5 library)
.
- Prev by Date: Re: calling stored procedure with optional parameter
- Next by Date: Re: calling stored procedure with optional parameter
- Previous by thread: calling stored procedure with optional parameter
- Next by thread: Presence and future of data access
- Index(es):
Relevant Pages
|
|