Programmer Guide : Timeout controls : Client timeouts
  
Client timeouts
Timeouts related to the database client are introduced in this topic.
Login timeout
This timeout refers to the number of seconds the driver waits for the login (SQLConnect) to succeed. The default value is driver-dependent. If the value (or ValuePtr in ODBC) is 0, the timeout is disabled and a connection attempt will wait indefinitely. If the specified timeout exceeds the maximum login timeout in the data source, the driver substitutes that value and returns SQLSTATE 01S02 (Option value changed).
This timeout applies for the TCP protocol only.
INI parameter
Overridden with SQL
Driver
Connection string
Client-side:
[Com]
ConnectTimeout=milliseconds
or:
Com.Connect parameter with option ‑cmilliseconds
For example:
[Com]
Connect=tcp -c1OOO 1315
 
 
ODBC:
SQL_ATTR_LOGIN_TIMEOUT (in seconds)
SQL_ATTR_LOGIN_TIMEOUT_MS (in
milliseconds, non-standard)
JDBC:
Method (JDBC 2.0)
DriverManger.setLoginTimeout(seconds); Connection property (non-standard) "solid_login_timeout_ms" (milliseconds)
-c milliseconds
Timeout error code and message:
ODBC:
HYT00, Timeout expired
Connection timeout
This timeout refers to the number of seconds (or milliseconds) the driver waits for any request on the connection to complete. This timeout is not associated with the query execution or login. Upon timeout, the driver disconnects from the solidDB® server.
If the client can detect reliably that the server is not reachable, it does not wait for the timeout to expire. This can happen, for example, if the server is expected to run on the same host, and the client detects that the server is not running.
The driver returns SQLSTATE HYT00 (Timeout expired) if it is possible to time out in a situation not associated with query execution or login. If the value (or ValuePtr in ODBC) is 0 (the default value), there is no timeout.
This timeout applies to all ODBC functions (ODBC 3.5 specifications) except the following:
SQLDrivers
SQLDataSources
SQLGetEnvAttr
SQLSetEnvAttr
INI parameter
Overridden with SQL
Driver
Connection string
Client-side:
[Com]
ClientReadTimeout=milliseconds
or:
Com.Connect parameter with option
-rmilliseconds
For example:
[Com]
Connect=tcp -r1000 1315
 
ODBC:
SQL_ATTR_CONNECTION_TIMEOUT (in seconds)
SQL_ATTR_CONNECTION_TIMEOUT_MS
(in milliseconds, non-standard)
JDBC:
Non-standard connection property:
"solid_connection_timeout_ms" (milliseconds)
or method:
SolidConnection.setConnectionTimeout() (milliseconds)
-r milliseconds
Timeout error code and message:
ODBC:
HYT01, Connection timeout expired
See also:
SOLID Server Error 14518:
Connection to the server is broken, connection lost.
SOLID Communication Error 21328 and SOLID Session Error 20024: Timeout while resolving host name.
SOLID Communication Error 21329 and SOLID Session Error 20025: Timeout while connecting to a remote host.
Query timeout
This timeout refers to the number of seconds the driver waits for an SQL statement to execute. If the value (or ValuePtr in ODBC) is 0 (the default value), there is no timeout.
If the specified timeout exceeds the maximum timeout in the data source, or if the specified timeout is smaller than the minimum timeout, SQLSetStmtAttr substitutes that value and returns SQLSTATE 01S02 (Option value changed).
This timeout applies to the ODBC functions (ODBC 3.5 specifications) as follows:
SQLBrowseConnect
SQLBulkOperations
SQLColumnPrivileges
SQLColumns
SQLConnect
SQLDriverConnect
SQLExecDirect
SQLExecute
SQLExtendedFetch
SQLForeignKeys
SQLGetTypeInfo
SQLParamData
SQLPrepare
SQLPrimaryKeys
SQLProcedureColumns
SQLProcedures
SQLSetPos
SQLSpecialColumns
SQLStatistics
SQLTablePrivileges
SQLTables
Note The application need not call SQLCloseCursor to reuse the statement if a SELECT statement timed out. The query timeout set in this statement attribute is valid in both synchronous and asynchronous modes.
INI parameter
Overridden with SQL
Driver
Connection string
 
 
ODBC:
SQL_ATTR_QUERY_TIMEOUT (in seconds)
SQL_ATTR_QUERY_TIMEOUT_MS (in milliseconds, non-standard)
 
Timeout error code and message:
ODBC:
HYT00, Timeout expired
See also
Timeout controls