OnDeleteError does not fire

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Dokkie
Posts: 43
Joined: Wed 08 Oct 2008 21:58

OnDeleteError does not fire

Post by Dokkie » Sun 25 Jul 2010 06:29

Using IBDAC 3.10.0.15 with FB2.1 Delphi 2010 Windows 7.
I have a small test project with a master-Detail relationship.
Both tables are IBCQuery components.

When I attempt to delete a detail record from an empty Detail table this generates an EDatabaseError as expected with 'Cannot perform this operation on an empty dataset' message.

I've written an OnDeleteError event for the Detail table - but it is not fired when this exception occurs.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 26 Jul 2010 09:42

The OnDeleteError event occurs when an application attempts to delete an existing record and an exception is raised. But if the dataset is empty this event is not arised. You can see this behaviour in the TDataSet.Delete method and we can't change it.

Post Reply