Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Selection of records from a table and applying a query on them

843840Feb 18 2010 — edited Feb 21 2010
Hi everyone I have a jsp code for attendance with access database.

Basically the code is supposed to work like this:

1. The teacher first enters information about the date ,semester , subject and time and submits.
2. Then depending on semester..the SELECT query is used to obtain the list of all students from a STUDENT table for that semester. So now a form is filled with the relevant information and the teacher has to only enter the attendance for each student. Once she s done she submits all this.
3. And the INSERT query is executed for table ATTENDANCE with the above info and the work is done

Problem:

Since there is a selective display of records from the STUDENT table using WHILE loop..the records are getting displayed. But only the first record is getting inserted after adding the attendance :(..The rest are simply ignored. Maybe its because the form fields have the same names but have diff records for each loop which is not being accounted for. Maybe there is a need of arrays or counter somewhere..I don't know..Please suggest something..i have a project report coming up next week..i ll mail the code now..
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 21 2010
Added on Feb 18 2010
9 comments
303 views