ACC2000: How to Set the QueryTimeout Value for ODBC Connections

ID: Q208386


The information in this article applies to:
  • Microsoft Access 2000

This article applies only to a Microsoft Access database (.mdb).

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

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SUMMARY

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


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: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

  1. Locate the following registry key:


  2. HKEY_LOCAL_MACHINE\Software\Microsoft\Jet\4.0\Engines\ODBC
  3. 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.



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:

Q135120 Configuration Backup Tool for Backing Up the Registry

Additional query words:

Keywords : kbusage kbdta OdbcHowto
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbhowto


Last Reviewed: September 20, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.