Associate
- Joined
- 19 Oct 2005
- Posts
- 528
Hey,
I am creating a vb6 program that updates a field in a access database.
I'm having trouble getting the SQL update command to work on the field number 4. I can get insert to work but cant get a field to update. Any help?
Thanks.
I am creating a vb6 program that updates a field in a access database.
Code:
Public Sub addNewSeat(ByVal aseat As String)
Dim db As New ADODB.Connection
Dim rec As New ADODB.Recordset
Dim query As String
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=H:\CNA\Card Problemvc\test.mdb;"
db.Open
[B] query = "Update seat Set (seat) = ('" & aseat& "') where (number) = 4[/B]
' query = "Insert into seat (seat) Values ('" & aseat & "');"
rec.Open query, db
End Sub
I'm having trouble getting the SQL update command to work on the field number 4. I can get insert to work but cant get a field to update. Any help?
Thanks.
