Skip to content

Types of Transaction Processing

There are three types of transaction processing: client-atomic, server-atomic, and server-logged. A file's transaction type is specified in its DF_FILE_TRANSACTION attribute. Not all database drivers offer all three types. Embedded DataFlex databases (as opposed to server-based ones) offer only client-atomic transactions. Individual drivers come with information on how they handle transaction processing and other driver-specific functionality.

DF_FILE_TRANSACTION_NONE

Tables used only for lookup should have transaction processing turned off on them.

DF_FILE_TRANSACTION_CLIENT_ATOMIC

Client-atomic transactions can be aborted by the program and, under some circumstances (e.g., deadlock), they will be aborted automatically by DataFlex. Client-atomic transactions do not provide protection from workstation crashes. If the workstation (whether from program failure or system failure) crashes while a client-atomic transaction is outstanding, part of the transaction may have already been written to the database and cannot be automatically backed out.

DF_FILE_TRANSACTION_SERVER_ATOMIC

Server-atomic transactions offer the same benefits as client-atomic transactions and, in addition, offer protection from workstation crashes. If a program (or the system) crashes while a server-atomic transaction is outstanding, the full transaction can be automatically backed out.

DF_FILE_TRANSACTION_SERVER_LOGGED

Server-logged transaction control offers the same benefits as server-atomic transaction control and, in addition, offers a rollback capability. System rollback restores the system to its status as of a specified point in time. For example, if your company payroll processing was started at 1 p.m. and then something went badly awry later in the afternoon, you could use this functionality to roll back the state of your system to the way it was at 1 p.m., so you could start again. Note that all transaction processing done after 1 p.m. would be affected, not just the payroll. This mode can only be used with server-based database tables in a client/server architecture.

See Also