skip to main content
Reference : Connection Property Descriptions : QueryTimeout
  

QueryTimeout

Purpose

Sets the default query timeout (in seconds) for all statements created by a connection.

Valid Values

-1 | 0 | x
where:
x
is a positive integer that represents a number of seconds.

Behavior

If set to -1, the query timeout functionality is disabled. The driver silently ignores calls to the Statement.setQueryTimeout() method.
If set to 0, the default query timeout is infinite (the query does not time out).
If set to x, the driver uses the value as the default timeout for any statement that is created by the connection. To override the default timeout value set by this connection option, call the Statement.setQueryTimeout() method to set a timeout value for a particular statement.

Default

0

Data Type

int

See also

Using Connection Properties