Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    124

    Unanswered: database insert question

    I have a form asking where a user inputs a numerical
    value into a text box. The form posts the name/value to the same page.

    The first form drives a second form, which dynamically
    creates table rows based on the value that was entered in the text field in
    the first form.

    I'm using a loop to create the table rows and increment each row by 1
    through each pass for the field names. Each row will correspond to a new
    record in a database table. So, "year1", "stategy1", "BO1", "BA1",
    "origBA1" and "IncrDecr1" would insert as a record, then the next row,
    etc., etc.

    I'm lost on how to fire the insert for each new row into the database?

    Here is a URL to see how the form works:

    http://www.dwayneepps.com/ABR_site/index.asp

    Thanks for any help!
    -D-

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    Why do you have to append a number to the value? Why don't you simply have a column for sequence number, and put the iteration value in there?

    As for looping through the rows, I looked at the page, and I'm not sure where the data is that you're trying to loop through. But I suppose all you'd need to do is have a while, do/while, or for loop and have multiple insert statements.

    Could you clarify what you're trying to accomplish?
    That which does not kill me postpones the inevitable.

Posting Permissions

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