partial recordset returned after deadlock




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)
.



Relevant Pages

  • Re: VBA CODE - ADODB
    ... i have been looking at vb6 and ado and dao. ... i have looked at the coding for adodb - and it does ... > Dim dbShop As Database 'declare database object ... > Dim rsShop As Recordset 'declare recordset object ...
    (microsoft.public.vb.general.discussion)
  • =?iso-8859-1?Q?Re:_Alles_anders_in_.Net_-_SQL_abschicken_f=FCr_DataSet?=
    ... In VB6 habe ich einfach Connection Objekt angelegt, ... In VB.Net habe ich ein Dataset, dass an eine DB gebunden ist. ... Dataset soll so wie früher das Recordset reagieren. ... Beim direkten Zugriff kann man entweder den aktuellen Datensatz des BindingManagers nutzen oder direkt über den Inder auf einen beliebigen Datensatz zugreifen. ...
    (microsoft.public.de.vb.datenbank)
  • Re: linked tables
    ... If you use VB6 you don't have Linked Table...., ... ADODC linked by OLEDB to your DB, or a Recordset connected ... and extract from Connect property the DATABASE string field. ... but you can use ODBC_DIRECT giving to Connect property member ...
    (microsoft.public.access.modulesdaovba)
  • Re: Issue Rowlock through a .Update on ADO recordset
    ... Also, I am using optimistic locking on the recordset, yet still have the ... Also, in the application, the users involved in the deadlock ... >yet the update method nor any recordset ... >I re-write all the .Update logic to use direct SQL statements, ...
    (microsoft.public.data.ado)
  • Moving from recordsets to datasets...
    ... Been writing VB6 for years and am now getting up to speed with .NET. ... then have a recordset in that class for each table. ... so that it works the same way as a dataReader and I ... Is there any way to create typed-datasets ...
    (microsoft.public.dotnet.framework.adonet)