Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
this is the question

Logged in, with database in a c# quiz application, im logged in, and make a test of a quiz, in the end whats the code of getting the result to a person database... what should i do..

what table should i make in the database, and whats for or code should i do in the c# application...
I dont know if you understand me or im clear with the question :/ ...
Posted
Comments
[no name] 6-May-14 10:28am    
Well.... what sort of instruction did you get when you got assigned this task? Did they not give you any instruction on how to create a table? Or what information was to be stored in the database? How would you expect us to know your requirements? And, this is not a question. This is "how do I write my entire application".
[no name] 6-May-14 10:30am    
i have my entire application, i just need when i get the results, the results to be saved in database thats all for the logged in user.
Peter Leow 6-May-14 10:35am    
What type of application, web or desktop? Did you create it or got it from somewhere? Do you have any knowledge of database, done any programming before?
[no name] 6-May-14 10:38am    
its desktop application, more then half i made it by myslef, and if you think i know i lot of this, i wouldnt have come here for help... i have a little knowledge in database, had class in programin, never done a program before.

1 solution

Create a table that has columns:
ID - Int, Identity is fine, this serves as a unique row identifier
UserID which links to the User table and identifies the user answering the question. (Foreign key)
QuestionID which links to the table of questions to identify which question the user is answering (Foreign key)
Answer given - depends on rest of your system what this is.
Titmestamp - DateTime. This is optional, but I'd include it because I'm like that...


Probably, you have a Quiz table which the Questions table refers back to.

Then, when he answers a question you create a new row in the table which refers to the user, the question, and his answer (and timestamps it so you know when he answered).
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900