November 2nd, 2010, 03:29 PM
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.
November 2nd, 2010, 03:56 PM
Please add some space/lines, the text is too clouded.
November 20th, 2010, 02:00 PM
your description is too vague to provide any specific help.
please try to be more specific - perhaps posting some example code
November 20th, 2010, 05:03 PM
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.
Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.