
Send Update Statement to SQl 6.5
I am trying to update a record in a table using an Update statement.
Im using Access 97 for the frontend and SQL 6.5 for the back end.
I can create an update query in access and then use the docmd.OpenQuery
method, but, isnt there a similar way to use the qdf.Execute or db.Execute
with this?
When I attempted to do this I got the following msg;
Error # 3003: Couldnt start transaction; too many transactions already
nested.
(In some other attemps I got the err: "to few parameters, expected 1"
however, I can't remember exactly what code produced that error)
Heres the code I used:
Function TestAddNew2()
Dim wsp As Workspace
Dim db As Database
Dim strSQL As String
Set wsp = DBEngine(0)
Set db = CurrentDb() '
wsp.BeginTrans
strSQL = "UPDATE Code_ACI SET CdACI_Type = 'tttttttt' WHERE CdACI_ID =
5"
db.Execute strSQL, dbFailOnError
wsp.CommitTrans
End Function
How can I do this?
What other options do I have for updating this record?
Thanks
George Padvorac