Commit Management

Previous Next

A given sequence of tasks (queries or data manipulations) can be performed as a single long transaction and then committed, or it can be performed with many commits in between.

Related data manipulations should be in the same transaction so they can be committed or rolled back as a logical whole. As a developer, you determine for each part of the application whether it is the application design or the user that decides what is a logical whole.

The main trade-off when deciding whether to commit often or not is between a few lock conflicts if many commits take place versus the possibility of rollback for longer transactions.

In an application where minimization of lock conflicts is crucial and the difference between Store Record and commit is not, you may want to set the application property Auto-commit to Yes (default No). This causes the application to automatically call DataCommit() immediately after each Store Record.