Re: Help with PRE-COMMIT trigger

From: Vijaya Kumar Nair <vknair_at_ix.netcom.com>
Date: 5 Feb 1995 02:52:28 GMT
Message-ID: <3h1ehc$abi_at_ixnews3.ix.netcom.com>


In <srwood.791823958_at_hubcap> srwood_at_hubcap.clemson.edu (Stephen Ross Wood) writes:

>
>
>In a PRE-COMMIT trigger, how can I tell if the reason for
>the trigger firing is due to a POST or a COMMIT action?
>Some of my validation only occurs when all data on a form
>is committed to the database, but not during a post.
>
>Steve
>
>

Hi,

We have overcome this problem by using following method.

We have a control block where we define all our form level control variables. Two variables - M_POST_FLAG and M_COMMIT_FLAG are defined here. Just before we issue a 'POST' command, we set the M_POST_FLAG  to 'Y' and M_COMMIT_FLAG to 'N'. In Post-commit trigger, we initialize these two variables to 'n'. Based on the flag, we define the actions required in pre-commit trigger.

This works very well.

Vijay Nair Received on Sun Feb 05 1995 - 03:52:28 CET

Original text of this message