# NOT RUN {
# }
# 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")
# }
Run the code above in your browser using DataLab