dbTransaction | R Documentation |
Run any db statements inside a transaction. If any error is raised the transaction will be rolled back, otherwise it will be committed at the end.
dbTransaction(conn, expr)
conn |
A database connection object, such as is returned by |
expr |
Any block of code. |
The value of the given block of code will be returned upon successfully commiting the transaction. Otherwise an error will be raised.
Kevin Horan
conn = initDb("test15.db")
dbTransaction(conn,{
# any db code here
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.