Description Usage Arguments Value Note See Also Examples
View source: R/odbcSetQueryTimeout.R
A query has to be already prepared using SQLPrepare()
Throws an error if any error occured
1 | 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
1 2 3 4 5 6 7 8 9 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.