#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Posts
    1
    Rep Power
    0

    Inserting multiple records with loop


    I’m working on enhancements to an existing system that college faculty use to submit syllabus information.

    Under the current system, faculty submit learning objectives one at a time. They have requested the ability to submit all learning objectives at once. The number of learning objectives will vary from one course to the next.

    So far, I’ve created a front end which allows faculty to specify how many learning objectives they’ll submit, which becomes a session variable. The subsequent form page loops to provide the number of fields specified by the session variable, and each field has a unique name based on the count (i.e. clo<%=count%>).

    My problem now is getting the form data into the database table. I had hoped there was a way to persist the session variable and submit the records by looping through using VBScript—basically “insert clo<%=count%> while count is less than Session(“clocount”)”—but so far I haven’t been able to figure out how to script this.

    Is my logic way off here? Not trying to get anyone to write it for me, but would be eternally grateful to anyone who can check my reasoning and/or point me in the right direction.
  2. #2
  3. Lord of the Dance
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,663
    Rep Power
    1945
    Please add some space/lines, the text is too clouded.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Posts
    15
    Rep Power
    0
    your description is too vague to provide any specific help.

    please try to be more specific - perhaps posting some example code
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,440
    Rep Power
    4539
    If you can pull all the stuff that you need to put in the db into your code, you should be able to write a code loop that will insert each item on each iteration.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo