Page 1 of 1

IBCAlert Bug ?

Posted: Wed 08 Jul 2009 10:49
by minkus
Hi!

I'm using Delphi2009/Firebird 2.5/Windows Vista x64/IBDAC 3.00.0.4

Create a new project. Drop an IBCConnection, IBCTransaction, IBCAlerter on the form, and give the parameters of a test database and set connected to true (so the program autoconnects on startup).

Add more then 1 (one) Event to IBCAlerter.Events, but only first Event work (in OnEvent EventMessage a get all of events registered in IBCAlerter component). I can't catch another event except first one.

In case that I set up only one Event all works perfectly.

Posted: Wed 08 Jul 2009 11:26
by johnsoft
I have the same problemms!

1. Only first event is registered.
2. When first event is triggered from DB, IBCAlerter calls "onEvent" for each event in the list with corresponding event name.


I take a look in IBCAlerter.pas and I suppose the error is in the TIBCAlerter.Start procedure in the following line:

Code: Select all

for i := 0 to ((FEvents.Count - 1) div IBC_MAX_EVENTS) do
the error is the div operator which returns always 0 - first item in the list.
I suppose the right operator should be mod.

Posted: Thu 09 Jul 2009 07:06
by Plash
This code is correct (one event group is created for IBC_MAX_EVENTS events).

We could not reproduce the problem. Please send to ibdac*devart*com a complete small sample that demonstrates the problem.