batch updates

Results 1 to 3 of 3

Thread: batch updates

  1. #1
    Join Date
    Dec 1969

    Default batch updates

    I'm trying to think through how to set up a batch update form. My form will show a number of articles. The administrator has the option to check a radio button for yes or no to approve the article. So, there could potentially be many articles on one page. I'm trying to figure out how to update all of the records at once. Is there some kind of batch update method I can use from ADO? Thanks.

  2. #2

    Default RE: batch updates

    Forget ADO. Shove your UPDATE procedure in a SQL stored procedure and use ADO to call that to do the update !

  3. #3
    Join Date
    Dec 1969

    Default RE: batch updates

    You need to use a For Each - Next Loop like the one below<BR><BR>Try using a check box, and have the value of the checkbox set to the ID of the article in the database, then you can use this code.<BR><BR>"ckb" below is just the name of the checkbox on the form.<BR><BR>On the page I used this on, I had 100 checkboxes on the form and only wanted to update the ones that were checked.<BR><BR>Make sure to set value="&#060;%=rs("id")%&#062;" or it won&#039;t work right<BR><BR>Hope this can help<BR><BR>mj<BR><BR>Code follows...<BR><BR><BR>SET activeRS = Server.CreateObject("ADODB.Recordset")<BR>For each Item in Request.Form("ckb")<BR> &#039;Response.Write "Item: " & Item & "<BR>"<BR> <BR> <BR> activeSQL = "Update Series SET Active = true Where KeyNo =" & Item <BR> activeRS.Open activeSQL,objConn,3,3 <BR> Response.Write "."<BR> <BR>Next

Posting Permissions

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