======================= LoginTimeout Property ======================= Sets or returns the number of seconds before an error occurs when you attempt to log on to an ODBC database. Settings and Return Values ~~~~~~~~~~~~~~~~~~~~~~~~~~ The setting or return value is an Integer representing the number of seconds before a login timeout error occurs. The default LoginTimeout property setting is 20 seconds. When the LoginTimeout property is set to 0, no timeout occurs. Remarks ~~~~~~~ When you're attempting to log on to an ODBC database, such as Microsoft SQL Server, the connection can fail as a result of network errors or because the server isn't running. Rather than waiting for the default 20 seconds to connect, you can specify how long to wait before raising an error. Logging on to the server happens implicitly as part of a number of different events, such as running a query on an external server database. You can use LoginTimeout on the DBEngine object in both Microsoft Jet and ODBCDirect workspaces. You can use LoginTimeout on the Workspace object only in ODBCDirect workspaces. Setting the property to -1 on a Workspace will default to the current setting of DBEngine.LoginTimeout. You can change this property in a Workspace at any time, and the new setting will take effect with the next Connection or Database object opened. The default value is determined by the ODBC driver. In a Microsoft Jet workspace, you can override the driver’s default value by creating a new “ODBC” key in the Registry path \HKEY_LOCAL_MACHINE\SOFTWARE\Jet\3.5\, creating a LoginTimeout parameter in this key, and setting the value as desired. ======================= 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.