Timeout expired

Discussions and downloads of using APL+Win with databases.

Timeout expired

Postby Struck » September 30th, 2008, 5:50 pm

I've been running a few queries using the ADO utilities, and after about 30 seconds my query times out with the following message:

ADO ERROR: Microsoft OLE DB Provider for ODBC Drivers exception 80040E31 [Microsoft][ODBC SQL Server Driver]Timeout expired

I figure this must be a setting of some sort, but I can't seem to locate where this setting is created.

Any ideas how to get around this?

Mark
Struck
 
Posts: 1
Joined: October 29th, 2007, 10:50 am

Postby Tech Support » October 1st, 2008, 6:36 pm

There is a xCommandTimeout property on the 'ADODB.Command' object. See if increasing it from the default setting (30 seconds) solves your problem.
Tech Support
 
Posts: 1133
Joined: February 10th, 2007, 7:33 am
Location: Rockville, MD

Re: Timeout expired

Postby Davin Church » October 15th, 2008, 11:47 am

John's quite right about this, assuming that your query really is one that's supposed to be taking that long. (Otherwise you might look for a problem with your query.)

In addition, if you have a recent version of my code (which might possibly not be on-line yet), I have a way to set a default for that for all such commands. Instead of going to the ADOCommand object to set the CommandTimeout property, look for the same property name on the ADOConnect (connection) object, normally 'ADODB'. If you set it there once then it will automatically be applied to all ADOCommand objects that are created on that connection.
Davin Church
 
Posts: 404
Joined: February 24th, 2007, 1:46 am


Return to APL+Win and Databases

Who is online

Users browsing this forum: No registered users and 1 guest

cron