odbcSetQueryTimeout {RODBCext} | R Documentation |
A query has to be already prepared using SQLPrepare()
Throws an error if any error occured
odbcSetQueryTimeout(channel, timeout = 0)
channel |
an open RODBC channel (connection) |
timeout |
the new query timeout value in seconds (0 means "no timeout") |
0 = success, 1 = success but with an info message,
Not all drivers will support a query timeout. You may get an error then or the query timeout values remains unchanged silently.
odbcGetQueryTimeout
, odbcConnect
,
odbcDriverConnect
## Not run: conn = odbcConnect('MyDataSource') sqlPrepare(conn, "SELECT * FROM myTable WHERE column = ?") odbcSetQueryTimeout(conn, 120) # sets the query timeout of the prepared statement sqlExecute(conn, 'myValue') sqlFetchMore(conn) ## End(Not run)