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

How to enforce Synchronous ADO operation

Status
Not open for further replies.

lollyjar

Programmer
Aug 3, 2003
29
GB
Hi,

I am running an update query via ADO, followed shortly afterwards by a select query, and since ADO is asyncronous, the select is picking up the old values rather than the new ones set by the update query.

How do I deal with it so that the first update command does not return control to the VBA code until it has completed?

Cheers
 
lollyjar,

Microsoft said:
Note that this method does not work when using the Microsoft Access ODBC driver with ADO. The Microsoft Access ODBC driver does not allow synchronized writes and reads between two continuously open ADO connections under any circumstance. In order to successfully write and read data using the Microsoft Access ODBC driver with ADO, the writer connection must be closed after the write is complete and the reader connection must be closed and re-opened prior to reading the data. Use the following method to synchronize writes and reads between 2 connections with the Microsoft Access ODBC driver and ADO:

Here is the info and example....

Microsoft


That should do it...

Good Luck... [thumbsup2]


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top