Skip to content

Transactions and Locking in DataFlex

DataFlex programs will alter data in tables using one of two methods. Either they will:

  • Use data-dictionaries (DDOs); or
  • Manually code transactions in their applications using commands. This method is usually referred to as "procedural".

All table changes in DDOs are handled through two messages: Request_Save and Request_Delete. Using DDOs greatly simplifies transaction handling. When you use DDOs, transaction support is built in (in fact, it is required).

Manual methods include using the traditional commands:

  • Save
  • Saverecord
  • Delete
  • Lock
  • Reread
  • Unlock
  • Begin_Transaction
  • End_Transaction
  • Abort_Transaction

Depending on the application's coding logic, changes may be required to make an application work properly with transactions. Even if a legacy application works properly with transactions, you may want to make changes in your code to take full advantage of the transaction handling.

If you have an application that uses DDOs or DSO, you will want to refer to the section titled Transaction and Data-Dictionaries.

If you have applications that do not use DDOs or DSO, you should review Transactions and Locking using the Command Language.

See Also