Partager via


CDaoQueryDef::SetODBCTimeout

Call this member function to set the time limit before a query to an ODBC data source times out.

void SetODBCTimeout( 
   short nODBCTimeout  
);

Parameters

  • nODBCTimeout
    The number of seconds before a query times out.

Remarks

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.

Requirements

Header: afxdao.h

See Also

Reference

CDaoQueryDef Class

Hierarchy Chart

CDaoQueryDef::GetODBCTimeout

CDaoQueryDef::SetName

CDaoQueryDef::SetSQL

CDaoQueryDef::SetConnect

CDaoQueryDef::SetReturnsRecords