Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATE database adodb problem

Status
Not open for further replies.

takwirira

Programmer
Mar 6, 2007
23
GB
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
 
forum796 Visual Basic(Microsoft) -VB.NET Forum would probably be a better option for this question.

This is the Visual Basic forum, which is understood as being VB 5/6 based only.

Regards

Frederico Fonseca
SysSoft Integrated Ltd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top