Results 1 to 3 of 3

Thread: halp!

  1. #1
    pootieTAnG Guest

    Default halp!

    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
    q Guest

    Default RE: halp!

    add <BR>number =1 in the first place.

  3. #3
    ?? Guest

    Default RE: halp!

    am i not using hte right syntax? i dont know VB very well.. so im not familiar with the little differences in syntax.. how do you add vars?

Posting Permissions

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