Sets the number of seconds that DB-Library waits for Microsoft® SQL Server™ to respond during calls to dbsqlexec, dbsqlok, dbresults, dbnextrow, and dbrpcexec.
RETCODE dbsettime ( INT seconds );
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.
dbdataready | dbrpcexec |
dberrhandle | dbsetlogintime |
dbgettime | dbsqlexec |
dbnextrow | dbsqlok |
dbresults | dbsqlsend |