From RAD Studio API Documentation
Jump to: navigation, search



TIBEvents = class(TComponent, IIBEventNotifier)


class PASCALIMPLEMENTATION TIBEvents : public System::Classes::TComponent


Type Visibility Source Unit Parent
class public
IBX.IBEvents IBX.IBEvents


TIBEvents enables applications to respond to posted events.

Use a TIBEvents component to allow your application to register interest in, and asynchronously handle, events posted by an InterBase server. The InterBase event allows applications to respond to actions and database changes made by other, concurrently running applications, without having to resort to polling the database on a regular basis, or communicating directly with the other applications.

In essence, the TIBEvents component allows an application to say 'I want to be informed when events X, Y and Z occur.' When any of the requested events does occur, the InterBase server notifies the application and OnEventAlert is called.

To use TIBEvents, set the Database property to the component that connects to the InterBase server. Then, use the Events property to indicate the events to which you want to respond. You can set the AutoRegister property to true if you want TIBEvents to automatically register interest in its events when the database component opens a connection, or set the Registered property to true after the connection is open to explicitly register your interest. Finally, write an OnEventAlert event handler to respond when the InterBase event handler informs TIBEvents that an event occurred.