void SetODBCTimeout( short nODBCTimeout );
throw( CDaoException, CMemoryException );
Parameters
nODBCTimeout
The number of seconds before a query times out.
Remarks
Call this member function to set the time limit before a query to an ODBC data source times out.
Tip The preferred way to work with ODBC tables is to attach them to a Microsoft Jet (.MDB) database. For more information, see the topic "Accessing External Databases with DAO" in DAO Help and the article DAO External: Working with External Data Sources in Visual C++ Programmer's Guide.
This member function lets you override the default number of seconds before subsequent operations on the connected data source “time out.” An operation might time out due to network access problems, excessive query processing time, and so on. Call SetODBCTimeout prior to executing a query with this querydef if you want to change the query timeout value. (As ODBC reuses connections, the timeout value is the same for all clients on the same connection.)
The default value for query timeouts is 60 seconds.
For information about querydefs, see the article DAO Querydef in Visual C++ Programmer's Guide. For related information, see the topic "ODBCTimeout Property" in DAO Help.
CDaoQueryDef Overview | Class Members | Hierarchy Chart
See Also CDaoQueryDef::GetODBCTimeout, CDaoQueryDef::SetName, CDaoQueryDef::SetSQL, CDaoQueryDef::SetConnect, CDaoQueryDef::SetReturnsRecords