QueryTimeout Property (DAO)

Microsoft DAO 3.60

QueryTimeout Property

           

Sets or returns a value that specifies the number of seconds to wait before a timeout error occurs when a query is executed on an ODBC data source.

Settings and Return Values

The setting or return value is an Integer representing the number of seconds to wait. The default value is 60.

Remarks

When you're using an ODBC database, such as Microsoft SQL Server, there may be delays due to network traffic or heavy use of the ODBC server. Rather than waiting indefinitely, you can specify how long to wait.

When you use QueryTimeout with a Connection or Database object, it specifies a global value for all queries associated with the database. You can override this value for a specific query by setting the ODBCTimeout property of the particular QueryDef object.

In a Microsoft Jet workspace, you can override the default value by creating a new “ODBC” key in the Registry path \HKEY_LOCAL_MACHINE\SOFTWARE\Jet\3.5\, creating a QueryTimeout parameter in this key, and setting the value as desired.