Try OpenEdge Now
skip to main content
ABL Database Triggers and Indexes
Database triggers : Trigger definition
 

Trigger definition

An ABL trigger is a block of ABL code that executes whenever a specific database event occurs. A database event is an action performed against the database. For example when you write a record to a database, a WRITE event occurs.
Because database triggers execute whenever a database event occurs, they are useful for tasks such as referential integrity. For example, if you delete a customer record from a database, you might also want to delete all of the customer’s order records. The event (deletion of a customer record) initiates the task (deletion of all associated order records). A database trigger is ideal for this type of processing because the same task must always be performed when the particular event occurs. Other suitable tasks are maintaining database security or writing database audit trails.
For more information on using ABL to write trigger code, see OpenEdge Development: ABL Reference and OpenEdge Development: ABL Essentials.