ODBCTimeout Property (DAO)

Microsoft DAO 3.60

ODBCTimeout Property

           

Indicates the number of seconds to wait before a timeout error occurs when a QueryDef is executed on an ODBC database.

Settings and Return Values

The setting or return value is an Integer representing the number of seconds to wait before a timeout error occurs.

When the ODBCTimeout property is set to -1, the timeout defaults to the current setting of the QueryTimeout property of the Connection or Database object that contains the QueryDef. When the ODBCTimeout property is set to 0, no timeout error occurs.

Remarks

When you're using an ODBC database, such as Microsoft SQL Server, delays can occur because of network traffic or heavy use of the ODBC server. Rather than waiting indefinitely, you can specify how long to wait before returning an error.

Setting the ODBCTimeout property of a QueryDef object overrides the value specified by the QueryTimeout property of the Connection or Database object containing the QueryDef, but only for that QueryDef object.

Note In an ODBCDirect workspace, after setting ODBCTimeout to an explicit value you can reset it back to the default (i.e., -1) only once during the life of the QueryDef object.  Otherwise, an error will occur.