Progress
Language Tutorial
for Windows
Triggers and Database Events
In Chapter 3, you learned about events and triggers. These triggers and events are called user-interface events and user-interface triggers. Tables and fields in a Progress database can receive a different type of event known as database events. Tables and fields respond to these events with a different type of trigger known as a database trigger.
When discussing database triggers, it’s also important to distinguish two types: schema triggers and session triggers. A schema trigger is a database trigger stored in the schema of a database. A session trigger is a database trigger used in code.
There are five database events, as described in Table 4–6.
To specify a trigger, access the table or field property sheet and choose the Triggers button. Figure 4–10 shows the Table Triggers dialog box for the Item table.
Figure 4–10: Table Triggers Dialog Box
![]()
The tutorial doesn’t cover how to write and implement database triggers. Still it’s important to know about them. Database triggers give 4GL programmers the ability to define custom default behaviors and business rules for your data. The database then becomes a central storage place for these rules.
For information on using the controls of the Table or Field Triggers dialog boxes, see the Progress Basic Development Tools manual.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |