Page 1 of 1

OnDeleteError does not fire

Posted: Sun 25 Jul 2010 06:29
by Dokkie
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.

Posted: Mon 26 Jul 2010 09:42
by Dimon
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.