Re: Database Commit with forms 4.0

From: lge <elkinsl_at_flash.net>
Date: 1997/06/07
Message-ID: <3398a2ff.84907506_at_news.flash.net>#1/1


Thomas,

One way is to place the Insert statement in the appropriate DML trigger much like forms handles the cascade delete (e.g. uses the pre-delete trigger). For example, you can code the insert statement in a pre-update trigger. In your case, since you want to do this for insert/delete/update, you might want to create a procedure (forms or database) that is called from a pre/post-update/insert/delete trigger so you don't have to redundantly code the insert statement. The key is that you want all your DML associated with DML triggers. That way, they are handled, in a sense, as a single "unit". If any part fails, they all fail. Oracle has a number of bulletins specifying the appropriate triggers for DML and the problems that can arise from coding DML in non-DML triggers. You might want to handle this through database triggers, depending upon your specific needs.

If you want to insert rows regardless of whether a commit is successful (or there are rows to commit), avoid coding the logic on a KEY-COMMIT trigger since the trigger does not always fire when committing. For example, change a row, don't committ, try to exit the form, you are prompted to save your changes. If your say yes, the KEY-COMMIT trigger does *not* fire. If your logic is in any of the DML triggers, it will.

Thomas Nowak <tom_at_biometrie.uni-koeln.de> wrote:

>Hi,
>
>is there any way to force an action on the commit statement in Forms?
>My documentation tells me, that Forms decides, wether to execute and
>update, delete or insert.
>
>I do need an insert statement, no matter what forms decides...
>
>regards,
>
>thomas nowak
Received on Sat Jun 07 1997 - 00:00:00 CEST

Original text of this message