title: VB6 Recordset update
body: <p>I am running a vb6 program that is looping through many records in a database table and entering a date into a field.  This will take many hours to run.</p>
  
  <p>I am noticing that the number of records in the table is increasing by 1 every few seconds and then reducing by 1 (going back to the original count).  Is there a reason for this?</p>
  
  <p>I am using a VB6 recordset and the update function i.e. rs.update.  I am not inserting any new records.</p>
  
  <p>The code is as follows:</p>
  
  <pre><code>rs.Open "select reference,value1,datefield from datetable where field1 = 'value1' " &amp; _
      "order by reference", objAuditCon.ActiveCon, adOpenStatic, adLockPessimistic
  
  Do While Not rs.EOF
      intReadCount = intReadCount + 1
      DoEvents
      If Not IsNull(rs("value1")) Then
          testArray = Split(rs("value1"), ",")
          rs2.Open "SELECT Date FROM TBL_TestTable WHERE Record_URN = '" &amp; testArray(1) &amp; "'", objSystemCon.ActiveCon, adOpenStatic, adLockReadOnly
          If rs2.EOF Then
  
          End If
          If Not rs2.EOF Then
              rs("DateField") = Format$(rs2("Date"), "dd mmm yy h:mm:ss")
              rs.Update
              intWriteCount = intWriteCount + 1
          End If
      rs2.Close
      Else    
      End If
  
  rs.MoveNext
  Loop
  rs.Close
  </code></pre>