Sets the number of seconds that DB-Library waits for Microsoft® SQL Server™ 2000 to respond during calls to dbsqlexec, dbsqlok, dbresults, dbnextrow, and dbrpcexec.
RETCODE dbsettime ( INT seconds );
seconds
Is the time-out value, or the number of seconds that DB-Library waits for SQL Server to respond before timing out. The default time-out value of 0 represents an infinite time-out period.
SUCCEED or FAIL.
This function sets the length of time, in seconds, that DB-Library waits for a SQL Server response during calls to dbsqlexec, dbsqlok, dbresults, dbnextrow, and dbrpcexec. The dbsettime function does not override existing network time-out settings.
The dbsettime function can be called at any time during the application, before or after a call to dbopen. It takes effect immediately upon being called.
To set a time-out value for calls to dbopen, use dbsetlogintime.
Note that if an application sends a command to SQL Server using dbsqlexec, control is not returned to the calling application until SQL Server completes the processing of the command. If the application program needs to continue execution while SQL Server is processing the command, it should send the command with dbsqlsend, continue its processing, and then, when it is ready to retrieve the results, call dbsqlok.
The program can call dbgettime for the current time-out value.