[AccessD] ADO OpenRecordest with Update

paul.hartland at fsmail.net paul.hartland at fsmail.net
Wed Oct 15 09:56:20 CDT 2003


I think you have to run UPDATES via the DataConnection.Execute like below, can't remember the exact code but should get you started.
Dim DBConn As ADODB.Connection
Dim mySql As String
mySql =  "UPDATE MyTable SET item_ref_date = Now() 
WHERE item_id = 16" 

set the DBConn with the connection string to the desired database then.
DBConn.Execute(mySql)
Paul




Message date : Oct 15 2003, 03:49 PM 
>From : Drawbridge.Jack at ic.gc.ca 
To : accessd at databaseadvisors.com 
Copy to : 
Subject : [AccessD] ADO OpenRecordest with Update 

Is it possible to have an ADO openrecordset ("sql_string") where the 
sql_string is an UPDATE statement? I see examples with SELECTs but no 
Update. 

We are getting error 3219 Invalid Operation 

mySql = "UPDATE MyTable SET item_ref_date = Now() 
WHERE item_id = 16;" 

Thanks 

jack 
_______________________________________________ 
AccessD mailing list 
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20031015/5114041f/attachment-0001.html>


More information about the AccessD mailing list