This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi , I am doing online test System.I am using Ms-Acess ,servlet and JSP.MY problem is For each user ,I wanted to store his mark for each question in different table.Right now I am using only one table so every time I run the program it will count previous marks also. I tried with seting autocommit to false.but didn't work. After login by each user can I create table dynamicaly in servlet ?? IF yes then how? thanks, -padmashree
I would guess you can include user's name as table name in SQL statement using "CREATE TABLE" + username + .... .But this is going to be very expensive when you will have a table for each user. Try to utilize only one table, I don't think it's very hard. - Alex
All right brain, you don't like me and I don't like you, but let's just do this one thing so I can get back to killing you with beer.<br /> <br />- Homer Simpson
Joined: Dec 18, 2000
I solved problem.. After login, I delete all rows from Result table..
I may be missing the point here, but surely it's simple to do with one table (lets call it "exam"). you have columns "user" (text), "question" (number), "answer" (number?), "correct" (boolean) When each user answers a question, place a new row in the table with the information on it, and calculate whether the answer was correct and store it in the "correct" column. Then, to work out someone's score just use SELECT COUNT FROM exam WHERE user="the user name" and correct=TRUE Is this the sort of thing you were looking for.
dear friend, i have similar sort of query. it goes as ...
> > i have a problem in multithreading which i am using > > in my code > > and i am not getting the path out of it. > > > > I have designed the servlets for online > > examination.But the problem is that > > only one user can give the exam at a time. > > i have used two variables to trace score and > > question number. > > when one user logs in there is no problem. > > > > but in between if other one comes, > > he gets his first question but his score is > > incremented with the score of first user. > > similarly his question. > > > > if user1 is on fourth question and his score=40; > > user2 gets score=50 for his first right answer > > infact it should be 10; > > > > i have incremented the score by 10 for each correct > > answer. > > the score and question_no are public variables. > > > > the test is for 10 questions and i am calling the > > same servlet in a loop till the completion. > > it is offcourse not fiesible to design n servlets > > for n users. > > i want the same servlet to be used by all the users. > > > > what should i do?? > > I am using jdk1.2.2 and Jsdk 2.0 > > > > please mail me if you can help me. > > thank you > > sachin