Discussion Locked

SQL ODBC timeout in RunSQL

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have in an Access database a query object reading from a remote database via ODBC. It takes a while, but it works. To let the user set criteria I have the same query in VBA executed from a form via DoCmd.RunSQL. I get an ODBC Timeout message. I know how to change the timeout value in a query object, but not in a text query within VBA. How can I set my timeout value, and is there anything else I can do?

6 replies

by steve.simons

Although I could spend a couple of hours writing out an answer for you, look at this MS KB article. I think it answers your question pointedly enough to where you can head off in the right direction.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q138066&ID=138066

Good Luck!

Q138066 - HOWTO: Handle OLE Automation Server Timeout and Synchronization
There are seven properties of the App object that allow you to handle the timing and synchronization of OLE calls made from a Visual Basic client to an OLE automation server:

by steve.simons

My bad. I just cut and pasted. Try this one.

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q138066

by steve.simons

Well, it doesn't like the cut and paste thing.
I'll type it out for you......

http://support.microsoft.com/default.aspx?scid=kb;en-us;Q138066

Try that.....

by steve.simons

Cut and paste the URL and remove the space that keeps somehow being put between the "; and the Q138066. That worked for me. If not, just search for the Knowledge Base article Q138066.

by john_wills

Essentially the note says that I may have been impatient. I can repeat the error by doing nothing for the 90-odd seconds the database takes to get there, so that is not the problem.

This discussion is closed to new replies.