the computer is lying!

Results 1 to 2 of 2

Thread: the computer is lying!

  1. #1
    peter roca Guest

    Default the computer is lying!

    im trying to update one field in every record that i have in a database. i just simply want to fill each one with a number, 1, 2, 3 etc.. this is my code <BR><BR>sub cleanup()<BR> Dim number<BR> SQLQuery = "SELECT ID FROM Employees "<BR> rst.Open SQLQuery <BR> If Not rst.BOF Then<BR> rst.MoveFirst <BR> End If<BR> number = CInt(1)<BR> Do Until rst.EOF = True<BR> rst.Fields("ID") = number<BR> number = number + 1<BR> rst.Update<BR> rst.MoveNext<BR> Loop<BR>end sub<BR><BR>and this is the error i get.. line 223 is the line rst.Fields("ID") = number.. <BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039;80040e21&#039; <BR><BR>Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done. <BR><BR>/newlayouts/names2/index.asp, line 223 <BR><BR><BR>what do i do??

  2. #2
    Join Date
    Dec 1969

    Default RE: the computer is lying!

    Check the field length of rst.fields("id") that could be one of the causes. Also, don&#039;t execute your update statement, and response.write the value of number to the screen you may see your error<BR><BR>mj

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts