Transactions
To commit multiple statements, group them using transactions.
By default, all database statements are individually committed. For example, if an insert call results in multiple insert statements, then each one gets committed individually. You can, however, use transactions. To group statements inside a transaction, call the beginTransaction() function before the statements, and call commit() after all the statements. Use rollback() to roll back the entire transaction in the event of an exception.
Copyright © Cloud Software Group, Inc. All rights reserved.