borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Minesweeper help with rnd()/randomization to set mines) New Topic New Poll Post Reply
AndreaVB Forum : VB General : please help with quiz creation!!!
Poster Message
sunny9
Level: Graduate

Registered: 12-12-2006
Posts: 10

icon please help with quiz creation!!!

hey everyone,could really do with some help!
im trying to create a quiz made in visual basic with the answers stored in access. the questions should be called from the database along with the possible answers into textboxes into a visual basic 2005 form. this is what ive got so far -
tried changing the listbox to textbox but dosent work
please help!!!

Private Sub Form7_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim strSQL As String = "SELECT * FROM questiontable"
        objConnection.Open()

        Dim objCommand As New _
        System.Data.OleDb.OleDbCommand(strSQL, objConnection)

        Dim objReader As System.Data.OleDb.OleDbDataReader
        objReader = objCommand.ExecuteReader
        If objConnection.State = ConnectionState.Open Then
            If objReader.HasRows Then
                While objReader.Read
                    ListBox1.Items.Add(objReader.GetValue(1))
                End While
            End If
        End If
    End Sub
End Class

18-12-2006 at 06:53 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB General : please help with quiz creation!!!
Previous Topic (Minesweeper help with rnd()/randomization to set mines) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder