IBCAlert Bug ?

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
minkus
Posts: 5
Joined: Sat 15 Oct 2005 08:30
Contact:

IBCAlert Bug ?

Post by minkus » Wed 08 Jul 2009 10:49

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.

johnsoft
Posts: 1
Joined: Wed 08 Jul 2009 11:02

Post by johnsoft » Wed 08 Jul 2009 11:26

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.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 09 Jul 2009 07:06

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.

Post Reply