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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update sql statement

Status
Not open for further replies.

mansukh20

Programmer
Mar 11, 2004
14
0
0
GB
Hi guys,

I am trying to update my database using the code below unfortunately it seems to be doing nothing at all. Any suggestions?

Dim strSQL4 As String
strSQL4 = "UPDATE VEHICLE SET VEHICLESTATUS = 'Booked' WHERE VEHICLEID = '" & dbcVehicleID.Text & "'"

adoVehicleUpdate.RecordSource = strSQL4
 
That property is only to return a recordset. You'll need to use the execute method of the connection object to do an update.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Exactly. As in:

adoVehicleUpdate.Recordset.ActiveConnection.Execute "UPDATE VEHICLE SET VEHICLESTATUS = 'Booked' WHERE VEHICLEID = '" & dbcVehicleID.Text & "'"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top