TIB_Events Object
Properties Methods Events

Unit
IB_Events

Declaration
TIB_Events = class(TIB_Component)

Description
This component is used to encapsulate InterBase's event functionality.

It is much more stable and flexible than all known components that deliver this unique and powerful feature of InterBase.

It takes care of all multi-threading issues by using synchronous event notification instead of processing the events immediately in a sub-thread.

To use this component fill in the Events property with the names of the events for which a registered interest exists. Each IB_Events component can handle only 16 event names. This is an InterBase limitation.

Then call the RegisterEvents method or set Registered to true.

Either assign an OnEventAlert event handler or override the DoEventAlert() method and build-in your own custom event handling logic. If you need Asynchroneous processing of the events then use System.BeginThread() to spawn a new thread or a TThread sub-class instance to do the asynchronous processing that you need performed.

It has been my observation that when using a remote server that TCP/IP is more reliable and stable than NetBEUI. If you are using NT 4.0 SP 3 then you will need to get a MS hot-fix for NT due to a bug in the OS. This can be accessed at:

ftp://ftp.microsoft.com /bussys/winnt/winnt-public/fixes/usa/NT40/hotfixes-postSP3/teardrop2-fix

LIBS has always worked just fine and does not need this patch applied.

Introduced Public Properties
AlertOnRegister   This property causes an alert to fire upon registration.
Events  List of event names to be monitored and receive notification for.
EventsPending  Status flag that tells if there are events pending or not.
IB_Connection  Reference to the database which will be generating event notifications.
Interval  Interval of time between instances where a flag is polled checking for an event notification from the database.
ProcessingEvents  Status flag to tell if events are currently being processed.
Registered  Registered status of the events.

Introduced Public Methods
CheckEvents   This method will check for events and dispatch them if necessary.
RegisterEvents   Register specified events to receive notification from the database.
UnregisterEvents   Cancel notification requests for specified events.

Introduced Public Events
AfterRegister  Event hook for added flexibility.
AfterUnregister  Event hook for added flexibility.
BeforeRegister  Event hook for added flexibility.
BeforeUnregister  Event hook for added flexibility.
OnEventAlert  Event where notification is received from the databse.
OnWakeup   Allow customization of how events are synchronized instead of using the default TTimer based mechanism.