Transactions, Introduction

4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next

version 1.5


Transactions are a series of related data modifications that are made to a database within a connection. A transaction is not saved permanently to a database until the transaction is validated. If a transaction is not completed, either because it was cancelled or because of some outside event, the modifications are not saved.

During a transaction, all changes that are made to the data within a connection are stored locally in a temporary buffer. If the transaction is accepted, the changes are saved permanently. If the transaction is cancelled, the changes are not saved.

After a transaction is validated or cancelled, the selection of each table for the current connection becomes empty, because transactions deal with temporary record addresses. For the same reason, you should be cautious when using named selections inside a transaction. After a transaction is validated or cancelled, a named selection created before or during the transaction may contain incorrect record addresses. For instance, a named selection may contain the address of a deleted record or the temporary address of a record added during the transaction.

The following functions manage transactions:

OP Start transaction - starta a transaction call.

OP Validate transaction - saves the changes made during the transaction started by OP Start transaction.

 OP Cancel transaction - cancels the changes made.


4D - Documentation   Français   English   German   4D Open for 4D, Command Theme List   4D Open for 4D, Command Alphabetical List   Back   Previous   Next