Description Usage Arguments Details Side Effects References See Also Examples
Commits or roll backs the current transaction in an Oracle connection
1 2 3 4 | ## S4 method for signature 'OraConnection'
dbCommit(conn, ...)
## S4 method for signature 'OraConnection'
dbRollback(conn, ...)
|
conn |
a |
... |
currently unused. |
implementation saves all changes done on that connection. Changes can not be undone once saved permanently.
implementation undo all chnages done after last savepoint.
saves changes permanently.
undo all changes done after last save point.
For the Oracle Database documentaion see http://www.oracle.com/technetwork/indexes/documentation/index.html.
Oracle
,
dbConnect
,
dbSendQuery
,
dbGetQuery
,
fetch
,
dbCommit
,
dbGetInfo
,
dbReadTable
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
drv <- dbDriver("Oracle")
con <- dbConnect(drv, "scott", "tiger")
dbReadTable(con, "EMP")
rs <- dbSendQuery(con, "delete from emp where deptno = 10")
dbReadTable(con, "EMP")
if(dbGetInfo(rs, what = "rowsAffected") > 1)
{
warning("dubious deletion -- rolling back transaction")
dbRollback(con)
}
dbReadTable(con, "EMP")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.