hie guys, im having trouble with updating an access database. Here is my code below. userAns and QuesNo are fields in the database and userAns and ques are variables that I have declared and will get values from textboxes etc. For some reason the details are not being updated into the database
Dim objConn As New OleDbConnection _
("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"User ID=Admin;" & _
"Data Source=db2.mdb")
objConn.Open()
Dim objAdapter As New OleDbDataAdapter
objAdapter.UpdateCommand = New OleDbCommand( _
"UPDATE Ques_Table SET userAns= '" & userAns & "' Where QuesNo ='" & ques & "'", objConn)
objConn.Close()
if anyone has a template of the SELECT, INSERT and other syntax for access db's please post as well
Dim objConn As New OleDbConnection _
("Provider=Microsoft.Jet.OLEDB.4.0;" & _
"User ID=Admin;" & _
"Data Source=db2.mdb")
objConn.Open()
Dim objAdapter As New OleDbDataAdapter
objAdapter.UpdateCommand = New OleDbCommand( _
"UPDATE Ques_Table SET userAns= '" & userAns & "' Where QuesNo ='" & ques & "'", objConn)
objConn.Close()
if anyone has a template of the SELECT, INSERT and other syntax for access db's please post as well