Using Array to update Table

Results 1 to 2 of 2

Thread: Using Array to update Table

  1. #1
    Join Date
    Dec 1969

    Default Using Array to update Table

    Any idea why I get error message "Subscript out of Range"? My code is as follows; <BR><BR>If objRS has data the following code is run.<BR>&#060;%<BR>If Not objRS.EOF then <BR><BR>arrArchiveAssign = objRS.GetRows() <BR><BR>Set objRS = Server.CreateObject ("ADODB.Recordset") <BR>objRS.Open "tblCategoryArchive", objConn, , adLockOptimistic, adCmdTable <BR><BR>For i = 0 to ubound(arrArchiveAssign,1) <BR>objRS.AddNew <BR>objRS("CATEGORYID") = 15 <BR>objRS("ARCHIVEID") = arrArchiveAssign(i) <BR>objRS("STATUSID") = 2 <BR>objRS.Update <BR>Next <BR>End If <BR>%&#062;<BR><BR>The aim is to load data from a Recordset into an array and then update a table using that array.

  2. #2
    . Guest

    Default REPOST

Posting Permissions

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