8. OpenSQL Statements : GET DBEVENT : Syntax
 
Share this page                  
Syntax
The GET DBEVENT statement has the following format:
EXEC SQL GET DBEVENT [WITH NOWAIT | WAIT [= wait_value]];
WITH NOWAIT
(Default) Checks the queue and returns immediately.
WITH WAIT[=wait_value]
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.