Subject Re: [IBO] IB_Event question
Author Helen Borrie
At 01:34 AM 21-10-02 +0200, you wrote:
>Hi,
>
>I use the OnEventAlert event of TIB_Events component
>to refresh my tables. This is the default TTimer based mechanism.

TIB_Events is not related to Delphi events, such as TTimer events. Its
purpose is to listen for database events which you post from within a
trigger or stored procedure on the server.


>I read in the help, that a WaitForSingleObject function can be used
>instead of the TTimer mechanism

Where did you find reference to this function? I have never heard of it.

>(with the call of CheckEvents method
>and OnWakeUp event), but I do not know how it works in practice.

I think it is possible you don't understand what database events are. If
this is the case, the methods and properties of TIB_Events will make more
sense to you if you study the Interbase manuals to get acquainted with events.

>Please give me a short example.

There is a sample application in the .\Samples\Events folder of your IBO
installation.

>
>Can you tell me why is this method better (than the other one)?

No. In the normal run of things, you wouldn't involve a TTimer event in
listening for database events. The Delphi event of most interest is
OnEventAlert. You can use a TTimer in your event handler here if you want
to have your app wake up and respond to certain events according to some
kind of cycle.

Helen