Batch updateing problems

Results 1 to 2 of 2

Thread: Batch updateing problems

  1. #1
    Join Date
    Dec 1969

    Default Batch updateing problems

    Hi,<BR><BR>I&#039m learning about doing batch updates to the DB. I reviewed the code found here (regarding batch updating) at 4Guys and found it very helpful but I wish to expand on it so that I can update serveral colums in the DB all at once. I have no problems getting the list to show in the asp page but when I try and update the DB is when I have the trouble and it&#039s in the update statement. Below is the update statement that works if I only want to update one colum in the DB with the new prices. But I also have a colum called "Day2" and "Day3" and so on until "Day7". How would I go about adding the "DAY2" and other Day# into this statement???<BR><BR>strSQL = "UPDATE DeliBar Set Day1 = " & strCost & " WHERE ID = " & strID<BR><BR>Thanks in advance for any help.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Batch updateing problems

    Just add commas and keep the "set"statement going. like an insert only different<BR><BR>strSQL = "UPDATE DeliBar Set Day1 = " & strCost1 & ", Day2 = " & strCost2 & " WHERE ID = " & strID<BR><BR><BR>This works with a single record. It should work with a batch as long as you have the form fields to update in your batch form stuff<BR><BR>hope it helpt<BR><BR><BR>

Posting Permissions

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