DataBlade® API event types
For a DataBlade® API module, an event is a communication from HCL Informix® software that indicates the existence of some predefined condition, usually the occurrence of an exception (warning or error). The DataBlade® API represents an event as one of the enumerated values of the MI_EVENT_TYPE data type.
The following table shows the MI_EVENT_TYPE values
that the DataBlade®
API supports.
Event type | When the event type occurs | C UDR | Client LIBMI application |
---|---|---|---|
MI_Exception | Raised when the database server generates an exception (a warning or an error) | Yes | Yes |
MI_EVENT_SAVEPOINT | Raised after the cursor flushes within an explicit transaction | Yes | No |
MI_EVENT_COMMIT_ABORT | Raised when the database server reaches the end of a transaction in which work was done | Yes | No |
MI_EVENT_END_XACT | Raised when the database server reaches the end
of a transaction, or if a hold cursor is involved, raised only after
the hold cursor is closed It is preferable to register the MI_EVENT_COMMIT_ABORT callback. |
Yes | No |
MI_EVENT_END_STMT | Raised when the database server completes the execution of the current SQL statement, or for statements associated with a cursor, raised when the cursor is closed | Yes | No |
MI_EVENT_POST_XACT | Raised just after the database commits or rolls back a transaction if work was done in the transaction or if an MI_EVENT_END_XACT event was raised | Yes | No |
MI_EVENT_END_SESSION | Raised when the database server reaches the end of the current session | Yes | No |
MI_Xact_State_Change | Raised when the database server starts or ends a transaction, whether the transaction contains one or multiple SQL statements | No | Yes |
MI_Client_Library_Error | Raised when the client LIBMI library encounters an error | No | Yes |
Important: MI_All_Events is a deprecated event
type and is not listed with the MI_EVENT_TYPE values. Using
the MI_All_Events event type is not recommended.
The milib.h header file defines the MI_EVENT_TYPE data
type and its event types. The DataBlade®
API event
types can be grouped as follows.
Event type | Event group | More information |
---|---|---|
MI_Exception | Database server exceptions | Database server exceptions |
MI_EVENT_SAVEPOINT |
State-transition events | State-transition events |
MI_Client_Library_Error | Client LIBMI errors | Client LIBMI errors |