First of all-I will guarantee I will mark the thread as solved when you kind people have helped me to solve the problem.

Ok well Ive got a project which is to make a Quizzing System for my school using a database. It is a multiple choice quiz (so only 1 out of the 4 answer is right for that one question - and so only need to check that the student has chosen the right answer).Ive spent quite alot of time trying to think how to do the project, but I think I need some advice from more experienced programmers (you):icon_smile:.....Well I can show you how I want the system to work in a kind of flow diagram (easier for you to understand).


The Student logs into the system--> Student chooses what test they want to take (taken from Database).-->Program loads the question from the database onto the screen (I've got this working by displaying the questions using text boxes)-->The problem is saving the answer the student thinks it is (I was thinking that I could just keep adding 1 to a textbox/array and then save the value to the database?).

So basically my problem is that I cant figure how I should what the user thinks the answer is (should I use Radio buttons or Checkboxes?) Reading other peoples threads I realised that I should include my database structures...I will attach the pictures of my current quizzing system and pictures of my database including relationship diagram.

Ok heres the code for screen that the Student looks at..

Public Class StudentQuestions
    Dim inc As Integer
    Dim MaxRows As Integer
    Dim con As New OleDb.OleDbConnection
    Dim ds As New DataSet
    Dim da As OleDb.OleDbDataAdapter
    Dim sql As String
    Dim Questions As String
    Dim radio As String
    Dim i As Integer


    Private Sub NavigatingDatabaseRecords_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        con.ConnectionString = "PROVIDER=Microsoft.JET.OLEDB.4.0;Data Source = D:\Work\Computing\Computing CourseWork\The Quiz DataBase.mdb"

        con.Open()

        sql = "Select * from tblQuestions"
        da = New OleDb.OleDbDataAdapter(sql, con)
        da.Fill(ds, "The Quiz DataBase")

        con.Close()
        MaxRows = ds.Tables("The Quiz DataBase").Rows.Count
        inc = -1

    End Sub
    Private Sub NavigateRecords()
        txtQuestion.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("Question")
        txtAnswer1.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("A1")
        txtAnswer2.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("A2")
        txtAnswer3.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("A3")
        txtAnswer4.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("A4")
        txtCorrectAnswer.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("CorrectAnswer")

    End Sub

    Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
        If inc <> MaxRows - 1 Then
            inc = inc + 1
            NavigateRecords()
        Else
            MsgBox("No more questions.")

        End If

    End Sub

    Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click
        If inc > 0 Then
            inc = inc - 1
            NavigateRecords()
        ElseIf inc = -1 Then
            MsgBox("No Records Yet")
        ElseIf inc = 0 Then
            MsgBox("First Record")
        End If
    End Sub

    Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLast.Click
        If inc <> MaxRows - 1 Then
            inc = MaxRows - 1
            NavigateRecords()
        End If
    End Sub

    Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click
        If inc <> 0 Then
            inc = 0
            NavigateRecords()
        End If
    End Sub

This code is for the 1st picture/attachment. (called StudentQuestions)

---------------
The Database Table names are

| tblQuestions | tblResult | tblStudentLogin| tblStudents | tblTeacherLogin | tblTechnicianLogin | tblTest | Test2Qs |

Thankyou, quick replys would be appreciated..and If you want to know anything else or want me to upload please tell me. :icon_smile:

Please if anyone has nay suggestions or help will be greatly appreciated..Thanks, its very important.

hii once again i have one idea for this problem use the radiobutton for the answer and give the value like ,1,2, and so on. now when you load the question from the database create one hidden txtbox and write the answer which is not visible at run time. and after mark the answer match the answer with that hidden textbox . then create global variable which is incremented when answer is write. and at the and store it to database.

I have made a successful project on this subject and its running i cant help u this time as im in hurry so if u need the project i can give it to u free (for betterment of school children only)

Regards
Mumtaz Ali Brohi

First of all-I will guarantee I will mark the thread as solved when you kind people have helped me to solve the problem.

Ok well Ive got a project which is to make a Quizzing System for my school using a database. It is a multiple choice quiz (so only 1 out of the 4 answer is right for that one question - and so only need to check that the student has chosen the right answer).Ive spent quite alot of time trying to think how to do the project, but I think I need some advice from more experienced programmers (you):icon_smile:.....Well I can show you how I want the system to work in a kind of flow diagram (easier for you to understand).


The Student logs into the system--> Student chooses what test they want to take (taken from Database).-->Program loads the question from the database onto the screen (I've got this working by displaying the questions using text boxes)-->The problem is saving the answer the student thinks it is (I was thinking that I could just keep adding 1 to a textbox/array and then save the value to the database?).

So basically my problem is that I cant figure how I should what the user thinks the answer is (should I use Radio buttons or Checkboxes?) Reading other peoples threads I realised that I should include my database structures...I will attach the pictures of my current quizzing system and pictures of my database including relationship diagram.

Ok heres the code for screen that the Student looks at..

Public Class StudentQuestions
    Dim inc As Integer
    Dim MaxRows As Integer
    Dim con As New OleDb.OleDbConnection
    Dim ds As New DataSet
    Dim da As OleDb.OleDbDataAdapter
    Dim sql As String
    Dim Questions As String
    Dim radio As String
    Dim i As Integer


    Private Sub NavigatingDatabaseRecords_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        con.ConnectionString = "PROVIDER=Microsoft.JET.OLEDB.4.0;Data Source = D:\Work\Computing\Computing CourseWork\The Quiz DataBase.mdb"

        con.Open()

        sql = "Select * from tblQuestions"
        da = New OleDb.OleDbDataAdapter(sql, con)
        da.Fill(ds, "The Quiz DataBase")

        con.Close()
        MaxRows = ds.Tables("The Quiz DataBase").Rows.Count
        inc = -1

    End Sub
    Private Sub NavigateRecords()
        txtQuestion.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("Question")
        txtAnswer1.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("A1")
        txtAnswer2.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("A2")
        txtAnswer3.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("A3")
        txtAnswer4.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("A4")
        txtCorrectAnswer.Text = ds.Tables("The Quiz DataBase").Rows(inc).Item("CorrectAnswer")

    End Sub

    Private Sub btnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNext.Click
        If inc <> MaxRows - 1 Then
            inc = inc + 1
            NavigateRecords()
        Else
            MsgBox("No more questions.")

        End If

    End Sub

    Private Sub btnPrevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrevious.Click
        If inc > 0 Then
            inc = inc - 1
            NavigateRecords()
        ElseIf inc = -1 Then
            MsgBox("No Records Yet")
        ElseIf inc = 0 Then
            MsgBox("First Record")
        End If
    End Sub

    Private Sub btnLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLast.Click
        If inc <> MaxRows - 1 Then
            inc = MaxRows - 1
            NavigateRecords()
        End If
    End Sub

    Private Sub btnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFirst.Click
        If inc <> 0 Then
            inc = 0
            NavigateRecords()
        End If
    End Sub

This code is for the 1st picture/attachment. (called StudentQuestions)

---------------
The Database Table names are

| tblQuestions | tblResult | tblStudentLogin| tblStudents | tblTeacherLogin | tblTechnicianLogin | tblTest | Test2Qs |

Thankyou, quick replys would be appreciated..and If you want to know anything else or want me to upload please tell me. :icon_smile:

Thankyou Mumtaz-This is a school project I was having difficutly with. Please send it to me, thankyou

truecoding and i have the same problem..would you mind to share with the complete code of making a multiple choice??im begging u guyz ..that also my final project in cs elective..pls ..thank u so much ..

truecoding and i have the same problem..would you mind to share with me the complete code of making a multiple choice??im begging u guyz ..that also my final project in cs elective..pls help me :( ..thank u so much .. email me at dovedove373@yahoo.com

please send it to me also the codes and the printscreen of the output in my email mark.1493@yahoo.com thanks :)

help me with the code for uploadin a picture in a database where by,you browse it before you upload

To everyone who is posting in this two-year old thread

  1. Please do not resurrect old threads. If you have a question then start a new thread
  2. Don't ask for a complete solution. You won't get it.

DaniWeb is not the place to go if you want someone to do your homework for you. We will help you if you are having specific problems (algorithm, Controls, etc) but we will not do the work for you. If this is your final project and you don't have a clue where to start then you obviously have not learned the course material and deserve to fail.

hello. sir or maam please help me can you give me the project of this system ill jus want to make it as may basis. please please please.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.