Icon View Incident Report

Serious Serious
Reported By: Peter Thorne
Reported On: 6/10/2009
For: Version 2.02 Build 14
# 3018 Self-Referencing Triggers Not Executing Properly and Stop After One Recursion

I have a simple EDB table containg the self-refencing structure for a tree. When I delete a row that represents the middle of a branch, I want to make sure that all orphans along the remains of the branch are also deleted. My curent trigger deletes the immediate orphan but does not appear to fire again when this itself is deleted (i.e. it doesn't nest) so I am left with spurious entries in my table.

TRIGGER "after_delete"
BEGIN
 DECLARE Structures_stmnt STATEMENT;
 PREPARE Structures_stmnt FROM 'DELETE FROM Structures
WHERE Structures.parent_id <> 0 AND
Structures.parent_id NOT IN (SELECT item_id FROM Structures)';
 EXECUTE Structures_stmnt;
END



Resolution Resolution
Fixed Problem on 6/11/2009 in version 2.02 build 15


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image