DB4S uses transactions so that you can group related changes together and, if necessary, revert unwanted actions. Before carrying out an action that would change the database, the program automatically issues a SAVEPOINT command. This enables the Write Changes and Revert Changes buttons. All subsequent changes to the database are included in this transaction. The changes are cached so you can see them in DB4S, but they are not visible to other programs accessing the same database file.

    When you are ready you can click Write Changes, which issues a RELEASE command to commit the data permanently. If you have made a mistake, you can hit Revert Changes, which issues a ROLLBACK command to remove all pending changes.

    Note that DB4S does not use nested transactions. All pending changes form part of a single transaction which is opened with the first change and closed when you commit or revert. If you use custom code in the ‘Execute SQL’ tab, beware of opening and closing transactions which may interfere with the way this works.