Valid in: ESQL
The Get Dbevent statement receives database events for which an application is registered. The get dbevent statement returns the next database event from the database event queue. To obtain database event information, issue the inquire_sql statement.
The Get Dbevent statement has the following format:
EXEC SQL GET DBEVENT [WITH NOWAIT | WAIT [= wait_value]];
(Default) Checks the queue and returns immediately.
Waits indefinitely for the next database event to arrive. If with wait = wait_value is specified, get dbevent returns when a database event arrives or when wait_value seconds have passed, whichever occurs first. If get dbevent times out before a database event arrives, no database event is returned.
Wait_value can be specified using an integer constant or integer host language variable.
The with wait option cannot be used within a select loop or a database procedure message processing routine called as the result of the whenever sqlmessage condition.
All users are permitted to use this statement.