Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: How to Set the QueryTimeout Value for ODBC Connections


View products that this article applies to.

This article was previously published under Q208386
This article applies only to a Microsoft Access database (.mdb).

Advanced: Requires expert coding, interoperability, and multiuser skills.

IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 (http://support.microsoft.com/kb/256986/EN-US/ ) Description of the Microsoft Windows Registry

↑ Back to the top


Summary

This article demonstrates how to set the QueryTimeout property for queries run against ODBC data sources.

↑ Back to the top


More information

When you use an ODBC database, such as Microsoft SQL Server, there may be delays because of network traffic or heavy use of the ODBC server. Rather than wait indefinitely, you can specify how long to wait before the Microsoft Jet database engine returns an error. The default QueryTimeout property setting is 60 seconds. This setting may not be long enough to allow some queries to run against ODBC data sources. The following steps demonstrate how to change the QueryTimeout property.

NOTE: When you set the QueryTimeout value within the registry, any new and existing queries within Microsoft Access continue to display a value of 60 for the QueryTimeout property. If the value you set within the registry is greater than the value defined within the individual query, Microsoft Access uses the value within the registry to determine how long to wait before a QueryTimeout occurs.

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
  1. Locate the following registry key:
    HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines\ODBC
  2. Click to highlight QueryTimeout, and then on the Edit menu, click Modify. Change the DWORD value to the setting that you want. The value represents the number of seconds to timeout.

↑ Back to the top


References

For additional information about backing up the system registry, please click the article number below to view the article in the Microsoft Knowledge Base:
135120� Configuration Backup Tool for Backing Up the Registry

↑ Back to the top


Keywords: KB208386, kbusage, kbhowto

↑ Back to the top

Article Info
Article ID : 208386
Revision : 2
Created on : 6/28/2004
Published on : 6/28/2004
Exists online : False
Views : 331