I am developing an online exam web application now. But i am confused about how i can access questions from database randomly..because i want to change questions for each student.
can you please give me some ideas. i am using struts frame work....
Thanks in advance
Bismi Varghese wrote: I am developing an online exam web application now. But i am confused about how i can access questions from database randomly..because i want to change questions for each student.
William has really nice suggestions you should think of.
If you want to stick to the database, here is what I did for this during my college.
1) Have a table with the question IDs and timestamp when it was asked.
2) Generate the random question ID and check the same in this table, if it exists, generate new question ID and update this table.
3) Have a script that runs every hour to remove records from the above table which are on hour old.
I don't know why I designed it that way, but it worked.
To prevent repeating a question to the same user, having the question ID in his/her session will suffice.
where the resultSet object is " SCROLL_SENSITIVE ",so that you can move BACK and FORTH within the resultSet content.
NOTE: (rs) is the result set object that you need to define before jdbcrowset.
After you define the resultSet make the cursor point to the end of the ROW in the resultSet and get the count of that row.
the best advantage of using the JdbcRowSet is that you can scroll at any perticular location in the row , hence forth use
I hope you can figure it out ,or in-case let me know if you need more details .