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

Issues with running action queries in a network environment.

Status
Not open for further replies.

juddymarch

Technical User
Aug 10, 2007
17
Hi, I have a form which contains code to run a large number of append and update queries on a number of tables as well as some dao code to alter data.
This method works fine when testing on a single machine, but I have noticed that on our clients network it occasionally needs to be run twice to return the correct results. Its been a bit difficult to resolve as it only occurs on the odd occasion so I can't really track what is going on.
What I think could be the problem is that the code is continuing on whilst the queries/updates are still being run, as they are taking a bit longer to run on the network. I'm just wondering if this could be possible and if anyone has had this problem before and could suggest a solution.
I don't really want to change the queries etc as it works perfectly 99% of the time, I just want to make sure each query has been completed before resuming the code.

Thanks
Justin

 

How about flushing the cache to be written before executing the next action query, in case you use an ADODB connection object to execute them.
 
You may use DoEvents in your code after each action query.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top