Icon StartTransaction Method

procedure StartTransaction(Tables: TStrings=nil)

Usage

Call the StartTransaction method to begin a new transaction. Before calling the StartTransaction method, an application should check the status of the InTransaction property. If the InTransaction property is True, indicating that a transaction is already in progress, a subsequent call to StartTransaction without first calling the Commit or Rollback methods to end the current transaction will raise an exception.

The Tables parameter allows you to specify a list of table names that should be included in the transaction. This is called a restricted transaction, since it usually involves only a subset of tables in the database. If the Tables parameter is nil, the default, then the transaction will encompass the entire database.

After the StartTransaction method is called, any updates, insertions, and deletions that take place on tables that are part of the active transaction are held by DBISAM until an application calls the Commit method to save the changes or the Rollback method is to cancel them.

Information The transaction isolation level in DBISAM is always read-committed, meaning that DBISAM will only allow sessions to view data that has been committed by another session. Any uncommitted data will be invisible until it is committed by the session.
Image