>>---EXEC SQL---SET OPTION----.-QUERYTIME---.----------.--> +-LOGINTIME---+ +-APPLICATION-+ +-HOST--------+ +-DATE--------+-USA------+ +-EUR------+ +-JIS------+ +-ODBC-----+ +-EXTERNAL-+ +-ISO------+ +-DEFAULT--+ +-TIME--------+-USA------+ +-EUR------+ +-JIS------+ +-ODBC-----+ +-EXTERNAL-+ +-ISO------+ +-DEFAULT--+ +-DATEDELIM--+-char-----+ +-TIMEDELIM--+-char-----+ +-TSTAMPSEP--+-char-----+ +-DETECTDATE-+-CLIENT---+ +-SERVER---+ +-OFF------+ >---value---END-EXEC---><
value | A literal or the name of a host variable. The host variable must contain character values for APPLICATION or HOST and numeric values for LOGINTIME or QUERYTIME. |
QUERYTIME | Sets the number of seconds that the program waits for a response to an OpenESQL statement. The default is 0, meaning forever. This option does not override existing network timeout settings. |
LOGINTIME | Sets the number of seconds that the program waits for a response to a CONNECT TO statement. The default is 10 seconds. A value of 0 indicates an infinite timeout period. |
APPLICATION | Sets the application name which is passed by OpenESQL to the data source when a CONNECT TO statement is executed. |
HOST | Sets the host workstation name which is passed by OpenESQL when a CONNECT TO statement is executed. |
The SET OPTION statement is not supported by all ODBC drivers.
exec sql set option date EUR end-execand
exec sql set option date=EUR end-exec
EXEC SQL SET OPTION logintime 5 END-EXEC EXEC SQL CONNECT TO "srv2" USER "sa." END-EXEC * If the CONNECT statement cannot log in to the server "srv2" * within five seconds, it will time out and return to the program. EXEC SQL SET OPTION querytime 2 END-EXEC EXEC SQL SELECT name FROM sysobjects INTO :name END-EXEC * If the SELECT statement does not respond within 2 seconds, * the query will time out and return to the program.