Description Usage Arguments Value Examples
Prepares a query for execution.
1 | sqlPrepare(channel, query, errors = TRUE, query_timeout = NULL)
|
channel |
ODBC connection obtained by odbcConnect |
query |
query string |
errors |
whether to display errors |
query_timeout |
the query timeout value in seconds (0 means "no timeout", NULL does not change the default value) |
invisible(1) on success, -1 or an error (depending on errors parameter) on error
1 2 3 4 5 6 7 8 9 10 11 12 | ## Not run:
conn = odbcConnect('MyDataSource')
sqlPrepare(conn, "SELECT * FROM myTable WHERE column = ?")
sqlExecute(conn, NULL, 'myValue')
sqlFetchMore(conn)
# with a query timeout
sqlPrepare(conn, "SELECT * FROM myTable WHERE column = ?", query_timeout=60)
sqlExecute(conn, data='myValue', fetch=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.