ODBC-call failed

greenspun.com : LUSENET : SQL Server Database Administration : One Thread

Please do help explain how to solve this frequent problem in my application: When calling a select query, it comes up after some minutes with the message [Microsoft][ODBC SQL Server Driver]Timeout expired.

Urgent answer will be appreciated.

-- Anonymous, April 06, 2000

Answers

Austin,

Since the timeout value is already 'some minutes' your select query is probably taking longer than allowed. I suggest that first you try rewriting your query. Consider adding indexes and breaking up your query into smaller parts.

If, after attempting to optimize the query, it is still taking longer than allowed, you can increase the SQL query timeout value.

To increase the SQL Query Time-out value:

1. From the SQL Enterpise Manager Tools menu, choose Options.

2. On the Connection tab, type a new value in the SQL query time-out box. 0 means infinite (no timeout).

If you want to do this in C or VB code, the way you set the timeout value depends on the data access method.

Hope this helps,

Eric

-- Anonymous, April 07, 2000


Moderation questions? read the FAQ