|
-----Original Message----- From: Buck Calabro <Buck.Calabro@commsoft.net> To: midrange-l@midrange.com <midrange-l@midrange.com> Date: Monday, August 20, 2001 12:38 PM Subject: RE: triggers within commit cycles >>If I update a record in a file that has an update >>trigger, then rollback the transaction using >>commitment control, does the trigger program >>fire again with the correct update that puts the >>record back like it was? > >Based on Bruce's answers, I need to do some testing! I'm not sure when the >trigger fires; at HLL "UPDATE" time or at COMMIT time. Either way, I >thought that a ROLLBACK would fire the "opposite" trigger; i.e. if the >record was added, the delete trigger would fire. I MUST do some testing! When the trigger fires is not the question. Why would a rollback fire an "opposite" trigger and where does THAT trigger come from? What is the opposite of an update trigger? If you are doing IO in the trigger, you must decide whether or not to include the IO in the commitment cycle or separate from that commit cycle. If you separate it, the IO will be there after the rollback operation. It's no different than calling a program. Rollback operations, while they are IO in nature are different than standard IO operations. Would you want a delete cascade to happen just because you chose not to insert a record into the database? =========================================================== R. Bruce Hoffman, Jr. -- IBM Certified Specialist - AS/400 Administrator -- IBM Certified Specialist - RPG IV Developer "America is the land that fought for freedom and then began passing laws to get rid of it." - Alfred E. Neuman
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.