informix
Informix DataBlade API Programmer's Manual
Handling Exceptions and Events

What Is An Event?

For a DataBlade API module, an event is a communication from the Informix software that indicates the existence of some predefined condition, usually the occurrence of an exception or an error. The DataBlade API represents an event as one of the enumerated values of the MI_EVENT_TYPE data type. Figure 10-1 shows the MI_EVENT_TYPE values that the DataBlade API supports.

Figure 10-1
DataBlade API Event Types

Event Type Description Where Event Occurs
User-Defined Routine Client LIBMI Application
MI_Exception Raised when the database server generates an exception (a warning or an error) Yes Yes
MI_EVENT_END_STMT Raised when the database server completes the execution of the current SQL statement Yes No
MI_EVENT_END_XACT Raised when the database server reaches the end of the current transaction, whether the transaction contains one or many SQL statements 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 many SQL statements No Yes
MI_Client_Library_Error Raised when the client LIBMI library encounters an error No Yes
MI_All_Events Raised when the DataBlade API encounters any of the preceding events Yes Yes

The milib.h header file defines MI_EVENT_TYPE and its event types.

The DataBlade API event types can be grouped as follows.

Event Type Event Group For More Information
MI_Exception Database server exceptions Handling Database Server Exceptions
MI_Xact_State_Change MI_EVENT_END_XACT MI_EVENT_END_STMT MI_EVENT_END_SESSION State-transition events Handling State Transitions
MI_Client_Library_Error Client LIBMI errors Handling Client LIBMI Errors
MI_All_Events All-events event Creating an All-Events Callback


Informix DataBlade API Programmer's Manual, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved