Contents Index Inserting updating, and deleting rows Accessing schema information

Native UltraLite for Java User's Guide
  Understanding UltraLite Development

Transaction processing in UltraLite


UltraLite provides transaction processing to ensure the correctness of the data in your database. A transaction is a logical unit of work: it is either all executed or none of it is executed.

By default, Native UltraLite for Java operates in autocommit mode, so that each insert, update, or delete is executed as a separate transaction. Once the operation is completed, the change is made to the database. If you set the Connection.autoCommit property to false, you can use multi-statement transactions. For example, if your application transfers money between two accounts, either both the deduction from the source account and the addition to the destination account must be completed, or neither must be completed.

If autoCommit is set to false, you must execute a Connection.commit() statement to complete a transaction and make changes to your database permanent, or you must execute a Connection.rollback() statement to cancel all the operations of a transaction.

For more information, see the ianywhere.native_ultralite.Connection class in the API Reference, in the online books.


Contents Index Inserting updating, and deleting rows Accessing schema information