9. Ensuring Data Integrity : Database Events : How Database Events Work : Receive an Event
 
Share this page                  
Receive an Event
To receive event information, an application must perform two steps:
1. Remove the next event from the session’s event queue (using GET DBEVENT, or implicitly, using WHENEVER DBEVENT or SET_SQL DBEVENTHANDLER).
2. Inquire for event information (using INQUIRE_SQL).
Get the Next Event from the Event Queue
The GET DBEVENT statement gets the next event, if any, from the queue of events that have been raised and for which the application has registered.
For the complete statement syntax and additional information about using the GET DBEVENT, see the SQL Reference Guide.
Obtain Event Information
To obtain event information, your application must issue the INQUIRE_SQL statement. With this statement, you specify one or more parameters to determine the type of information to retrieve. For example, to retrieve the text specified in the event_text parameter when the event was raised, use INQUIRE_SQL (DBEVENTTEXT).
For the complete statement syntax and additional information about using the INQUIRE_SQL statement, see the SQL Reference Guide.