Using Event Alerters

From InterBase

Go Up to The Procedure Body


To use an event alerter in a stored procedure, use the following syntax:

POST_EVENT <event_name>;

The parameter, <event_name>, can be either a quoted literal or string variable.

Note:
Variable names do not need to be—and must not be—preceded by a colon in stored procedures except in SELECT, INSERT, UPDATE, and DELETE clauses where they would be interpreted as column names without the colon.

When the procedure is executed, this statement notifies the event manager, which alerts applications waiting for the named event. For example, the following statement posts an event named “new_order”:

POST_EVENT 'new_order';

Alternatively, a variable can be used for the event name:

POST_EVENT event_name;

So, the statement can post different events, depending on the value of the string variable, <event_name.>

For more information on events and event alerters, see the Embedded SQL Guide.

Advance To: