Rolls back the active transaction associated with the current connection.
Syntax
void rollBack()
Parameters
None.
Return values
None.
Exceptions
CwDBTransactionException - If
Notes
The rollback() method ends the active transaction by rolling back any changes made to the database associated with the current connection. The beginTransaction(), commit() and rollBack() methods together provide management of transaction boundaries for an explicit transaction. This transaction contains SQL queries, which include the SQL statements INSERT, DELETE, or UPDATE, and a stored procedure that includes one of these SQL statements. If the roll back fails, rollback() throws the CwDBTransactionException exception and logs an error.
Before beginning an explicit transaction, you must create a CwDBConnection object with the getDBConnection() method from the BaseCollaboration class. Make sure that this connection uses explicit transaction bracketing
Examples
For an example of managing a transaction with rollback(), see the example in "Transaction scope with explicit transaction bracketing".
See also
beginTransaction(), commit(), getDBConnection(), inTransaction()