Maintaining Data Integrity

Applies To: Microsoft Dynamics AX 2012 R3, Microsoft Dynamics AX 2012 R2, Microsoft Dynamics AX 2012 Feature Pack, Microsoft Dynamics AX 2012

You can maintain database integrity by using one or more of the following features:

  • A DeleteAction element maintains database consistency when a record is deleted. For more information about adding a DeleteAction element, see How to: Create Delete Actions.

    Note

    If you add a DeleteAction to a table and you use the delete_from statement, database performance will be slow. For more information, see delete_from.

  • The forUpdate keyword in a select statement and the selectForUpdate table method ensure that records must be selected before they are updated or deleted. For more information, see Select Statement Syntax.

  • The ttsbegin, ttscommit, and ttsabort keywords ensure that all changes that are associated with a transaction are completed successfully. If the changes are not successfully completed, the transaction is aborted and the database is rolled back to the initial state.

  • The UnitofWork class can simplify the task of modifying the data records in multiple tables within the scope of a single transaction. For more information, see How to: Use the UnitOfWork Class to Manage Database Transactions.

See also

Database for Microsoft Dynamics AX

Table Methods

How to: Create Delete Actions

Announcements: New book: "Inside Microsoft Dynamics AX 2012 R3" now available. Get your copy at the MS Press Store.