Re: Forms 5.0 and database triggers

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 31 May 1999 01:38:14 GMT
Message-ID: <7isp66$n3f$1_at_nntp.csufresno.edu>


In article <374EAFBC.DCEDC01D_at_icon.co.za>, Louis Spies <louiss_at_icon.co.za> wrote:
>I have an insert trigger on a table that changes the value of one of the
>fields that are inserted into a table.
>
>When inserting a record from within Forms, how can I get Forms to
>display the new value after the insert trigger has fired?

In your key-commit process (create one if you don't have one already), after you do a Commit_Form, do this:

  Commit_Form;
  If :System.Form_Status <> 'QUERY'
  Or not Form_Success then
    Raise Form_Trigger_Failure;
  End if;
  Go_Block('Your_Block');
  Execute_Query;

If you allow the user to enter query criteria in an Enter_Query mode, then you will need to store off the :System.Last_Query value and set the block's query to that before the final Execute_Query above.

Do not do a 'Select... into...' following the commit. It will foul up your form's automatic processing.

Steve Cosner
http://members.aol.com/stevec5088 Received on Mon May 31 1999 - 03:38:14 CEST

Original text of this message