The mi_disable_callback() function
The mi_disable_callback() function disables a callback for a single event or for all events.
Syntax
mi_integer mi_disable_callback(conn, event_type, cback_handle)
MI_CONNECTION *conn;
MI_EVENT_TYPE event_type;
MI_CALLBACK_HANDLE *cback_handle;
- conn
- The value is either a NULL-valued pointer or a pointer to a connection descriptor established by a previous call to mi_open(), mi_server_connect(), or mi_server_reconnect().
- event_type
- The event type for the callback. For a list of valid event types, see the HCL OneDB™ DataBlade® API Programmer's Guide.
- cback_handle
- A callback handle that a previous call to mi_register_callback() has returned.
Valid in client LIBMI application? | Valid in user-defined routine? |
---|---|
Yes | Yes |
Usage
The mi_disable_callback() function disables the callback that cback_handle identifies for the event that event_type specifies. The conn value must be a pointer to the same connection descriptor as the connection on which the callback was registered with mi_register_callback().
- MI_EVENT_SAVEPOINT
- MI_EVENT_COMMIT_ABORT
- MI_EVENT_POST_XACT
- MI_EVENT_END_STMT
- MI_EVENT_END_XACT
- MI_EVENT_END_SESSION
- MI_Exception
- MI_Xact_State_Change
- MI_Client_Library_Error
The callback is automatically enabled when it is registered with mi_register_callback() function. You can explicitly disable the callback with the mi_disable_callback() function.
For a description of how to enable and disable callbacks or information about how to register a callback, see the HCL OneDB DataBlade API Programmer's Guide.
Return values
- MI_OK
- The function was successful; the callback was disabled.
- MI_ERROR
- The function was not successful.