Concepts: Transaction

A transaction is required when the ObjectStore database is accessed. There are two different types of transactions: ReadOnly and ReadWrite. A ReadOnly transaction only allows reading the database whereas a ReadWrite transaction also allows to modify objects in the database.

Modifications made during a ReadWrite transaction are only written into the database during "Commit". If, however, the transaction is interrupted by "Abort", the database remains unchanged.

If necessary, EPLAN API will start transactions automatically when a function or a command is being executed. If e.g. a command fails, the transaction is automatically aborted. No changes can then be made in the database.

It is an advantage that you no longer have to care about the transaction handling which will simplify API programming. However, there is the disadvantage that a large number of transactions is started and terminated again. This may have strong effects on the performance of an API client. You can avoid this problem by combining parts of your API client (e.g. a command-handler function) to one transaction and executing them at once without having to start and terminate an individual transaction for each API function in this part. The performance of offline programs can be increased by embedding all database operations in one transaction.