Update multiple db records

Results 1 to 3 of 3

Thread: Update multiple db records

  1. #1
    Galfrommines Guest

    Default Update multiple db records

    It must be possible to allow multiple entries in a form and then after submitting them write them all to the database.<BR>I&#039m thinking that it may be possible to have the form in a loop and update the form field name as you go, i.e somethin like:<BR>name1, name2, name3 etc. The "name" portion of the field name is fixed and as you loop you add the number (there would be a counter).<BR><BR>When the user has stopped inputting the information (by clicking the submit button) then there would have to be a loop on the results page as well to update the database.<BR><BR>Question is: how do you do it? Can anyone help?<BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default RE: Update multiple db records

    yes, this is possible. for example.<BR><BR>for j = 1 to selectname.count<BR> &#039---do your insertion here...note this is just pseudo syntax<BR> SQL = "INSERT INTO....WHERE fieldwhatever =" & selectname(j)<BR>next

  3. #3
    galfrommines Guest

    Default RE: Update multiple db records

    You&#039ve addressed the writing to the database, but how would you do the part where you need to generate an array for the input fields on the form. I guess this is what would be the selectname.count. how is the object created? Also, this is an update to existing records not for writing new ones.

Posting Permissions

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