IIapi_getEvent() Function--Wait for Database Events
The IIapi_getEvent() function provides an interface for applications to wait for database events to occur. The IIapi_getEvent() function checks for database events that are received, independent of other query results being returned by the server. Database event information is retrieved using IIapi_catchEvent(), which should be called prior to calling IIapi_getEvent().
An application prepares to process database events by registering with the server (IIapi_query()) and OpenAPI (IIapi_catchEvent()) for specific events. The application can then receive event notification while processing other queries on the connection.
IIapi_getEvent() can be called to receive database events when the application does not have any query processing to be performed on the desired connection. No queries can be issued on the specified connection handle until IIapi_getEvent() completes.
This function has the following syntax:
II_VOID IIapi_getEvent ( IIAPI_GETEVENTPARM *getEventParm );
typedef struct _IIAPI_GETEVENTPARM
{
IIAPI_GENPARM gv_genParm;
II_PTR gv_connHandle;
II_LONG gv_timeout;
} IIAPI_GETEVENTPARM;
This function has the following parameters:
gv_genParm
Type: input and delayed output
gv_connHandle
Type: input
Specifies the connection handle, identifying the connection to the target server, or the environment handle.
gv_timeout
Type: input
Specifies the maximum time in milliseconds to wait for the database event to be received. A value of -1 means to wait indefinitely. A value of 0 polls for events without waiting.
Note: Support for timeouts is platform-dependent. If timeouts are not supported, all values are treated the same as -1.
Last modified date: 08/28/2024