RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TIBEvents Class

TIBEvents enables applications to respond to posted events.

Pascal
TIBEvents = class(TComponent, IIBEventNotifier);
C++
class TIBEvents : public TComponent, public IIBEventNotifier;

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. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!