IDS 7.3 - Transaction in Triggered action
Posted in 2000
Topics: Stored Procedures & SPL, Triggers, Constraints & Referential Integrity, Versions, Editions & End-of-Life
Hi All ! I am developping on IDS 7.31 TC2 on Windonw NT plateform. I want to implement a trigger (After Insert FOR EACH ROW) on a table, wich trigger executes a stored procedure as triggered action. This stored procedure supports transaction management : it includes BEGIN WORK, COMMIT WORK and ROLBACK WORK statements. I am very surprised to get the following message from INFORMIX when I try to build this trigger : " -744 : Illegal statement in trigger". As I can see in the FinError utility, transaction statements may not be supported in triggered actions so my questions are : - is the rollback ALWAYS implicit when triggered actions fail ? - is there a workaround to manage transactions within triggered actions ? TIA Arnaud -- - -------------------------------------------------------------- - - Arnaud ANDRIEUX arnaud.andrieux@aql.fr - - Ingenieur en developpement - - Departement Developpements et Etudes - - -------------------------------------------------------------- - - ALLIANCE QUALITE LOGICIEL http://www.aql.fr - - Rue de la Chataigneraie - - B.P. 127 - - 35513 CESSON SEVIGNE - - tel : (33) (0)2.99.12.50.00 - - fax : (33) (0)2.99.63.70.40 - - -------------------------------------------------------------- -
Arnaud ANDRIEUX wrote: > Hi All ! > > I am developping on IDS 7.31 TC2 on Windonw NT plateform. > I want to implement a trigger (After Insert FOR EACH ROW) on a table, > wich trigger executes a stored procedure as triggered action. This > stored procedure supports transaction management : it includes BEGIN > WORK, COMMIT WORK and ROLBACK WORK statements. > > I am very surprised to get the following message from INFORMIX when I > try to build this trigger : " -744 : Illegal statement in trigger". As I > can see in the FinError utility, transaction statements may not be > supported in triggered actions so my questions are : > - is the rollback ALWAYS implicit when triggered actions fail ? Yes. In a logged database, all actions that are the result of the initial trigger action are in an implicit transaction - either they all succeed or they all are rolled back. Examine the Syntax manual for fuller details. > > - is there a workaround to manage transactions within triggered actions > ? >