Hey guys,

Very puzzled...and could use any suggestions/advice to help me resolve this problemo!

Implemented a trigger for specific tables which works fine, when records are inserted, deleted or updated via the java app.

However the problem occurs when for eg deleting records from the junction tables then the main tables. Although it deletes the records, the trigger does not fire! (when it fires it should write the old record in the audit table)...Example code below:
{...
deleted=deleteData(c.fDeleteRiskPlan,c.colRCpRisk) ;

...}

above deletes data from junction table - trigger fired works fine-audit table has old record in it

{...
deleted=deleteData(c.fDeleteRiskPlan,c.colRCpRisk) ;
deleted=deleteData(c.fDeleteRiskStep,c.colRSRiskID );
deleted=deleteData(c.fDeleteRisk,c.colRiskID);
...
}

above deletes data from the two junction tables and the main table - but the trigger does not fire this time round!!!

the trigger on the table is:

CREATE TRIGGER risk_audit
AFTER INSERT OR DELETE OR UPDATE on risk
FOR EACH ROW EXECUTE PROCEDURE risk_changes_audit();

the trigger is written for each table-the only diff is the tbl name.

Any ideas y this may happen???

Thanks in advance

ev.