Re: Forms : Transactions

From: Ton Schalke <tschalke_at_worldonline.nl>
Date: Fri, 05 Jan 2001 19:02:47 +0100
Message-ID: <3A560C47.26B96AED_at_worldonline.nl>


Use a raise form_trigger_failure in your post-insert trigger.

"Jérôme PERRET" wrote:
>
> Hi,
>
> I want to understand how I can create a transaction for a couple of command.
> My problem is that I got a POST-INSERT trigger on a block (based on table A)
> and this trigger create a record in table B. When my trigger ran into an
> error, and my record is not created in table B, I want the record not to be
> inserted in table A. I can *NOT* use a PRE-INSERT trigger because table B
> containt a foreign key on table A so A must be inserted before B.
> Can I told form that my transaction start just before inseting in A and end
> after POST-INSERT trigger ?
> Must I use an ON-INSERT trigger on table A doing the 2 insertions ?
> Must I put an EXCEPTION in my POST-INSERT trigger with a rollback ? If yes,
> what about inserting more than one value at the same time : will all
> insertion be cancelled ?
> ....
>
> Thanks for help
> Jérôme
Received on Fri Jan 05 2001 - 19:02:47 CET

Original text of this message