wwfc_barmy_army
New member
- Joined
- Apr 18, 2008
- Messages
- 3
- Programming Experience
- Beginner
Hello.
I have this code and i'm trying to put the following value into the database, but it's not working.
Where am i going wrong? Thanks.
I have this code and i'm trying to put the following value into the database, but it's not working.
VB.NET:
Dim conn = New OleDbConnection()
'connect database
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=MainDB.mdb"
'openconnection
conn.Open()
selectedID = LoginForm1.IDbox.Text
Label1.Text = selectedID.ToString
'text not entered
' If letter.Text = "" Then
' MsgBox("Please enter a letter")
' End If
'check for correct letter
' If letter.Text = "H" Or "h" Then
Dim cmd As OleDbCommand = New OleDbCommand("UPDATE pupil SET Q1 = 1 WHERE ID=" + selectedID, conn)
' Else
' Dim cmd As OleDbCommand = New OleDbCommand("UPDATE =" & TextBox1.Text & "SET Q1 = 0", conn)
' End If
conn.close()
' Me.Hide()
' Question2.show()
Where am i going wrong? Thanks.