Indicates the number of seconds to wait before a timeout error occurs when a CdbQueryDef is executed on an ODBC database.
Syntax
VOIDSetODBCTimeout(SHORT sTime);
SHORTGetODBCTimeout(VOID);
Parameters
Type | Argument | Description |
SHORT | sTime | A Short that contains number of seconds to wait before a timeout error occurs.
When the ODBCTimeout property is set to 0, no timeout error occurs. When the ODBCTimeout property is set to -1, the timeout defaults to the current setting of the CdbQueryTimeout property of the CdbConnection or CdbDatabase object that contains the CdbQueryDef. |
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 CdbQueryDef object overrides the value specified by the QueryTimeout property of the CdbConnection or CdbDatabase object containing the CdbQueryDef, but only for that CdbQueryDef object.
Note In an ODBCDirect workspace, after setting ODBCTimeout to an explicit value you can reset it back to the default (that is, -1) only once during the life of the CdbQueryDef object. Otherwise, an error will occur.