IBX.IBDatabase.TIBDatabase.AddEventNotifier

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure AddEventNotifier(Notifier : IIBEventNotifier);

C++

void __fastcall AddEventNotifier(_di_IIBEventNotifier Notifier);

Properties

Type Visibility Source Unit Parent
procedure
function
public
IBX.IBDatabase.pas
IBX.IBDatabase.hpp
IBX.IBDatabase TIBDatabase

Description

Adds an event notifier to the database's internal list so that the database can handle registering and unregistering interest in events.

Call AddEventNotifier when you want the database to automatically register and unregister an interest in server events when it opens and closes a connection to the server.

Notifier is the interface to an object that has in interest in a set of events on the InterBase server. For example, Notifier can be the interface to a TIBEvents object.

AddEventNotifier adds Notifier to its internal list of event notifiers. When TIBDataBase opens a connection, it checks every notifier in its list, and if a notifier indicates that it wants to be auto-registered, AddEventNotifier calls its RegisterEvents method so that the notifier registers its interest with the InterBase Event manager. Before TIBDataBase closes a connection, it unregisters interest from every notifier in its list.

Note: If Notifier is a TIBEvents object, AddEventNotifier is automatically called when you set the Database property.