Re: When does forms 'message_code' value get refreshed

From: Steve Cosner <stevec5088_at_my-deja.com>
Date: Wed, 10 Jan 2001 22:02:10 GMT
Message-ID: <93im4q$jq7$1_at_nnrp1.deja.com>


Message_Code does not get reset in Forms. It just contains the last error that has occurred, until another occurs. There are easy ways to determine whether your query retrieved no rows. I use :System.Block_Status, or Get_Block_Property(...,Status) to see if the block status is 'NEW' or not.

Steve Cosner
http://members.aol.com/stevec5088

In article <93iajo$8fg$1_at_nnrp1.deja.com>,   mattn123_at_my-deja.com wrote:
> When does forms 'message_code' value get refreshed?
>
> My form attempts to query a non-existant record which causes a FRM-
> 40301, and the value in the 'message-code' variable is '40301'.
>
> Based on that value I bypass other processing, like reading more data,
> which is no longer appropriate when this first record does not exist.
> I do this by calling 'RAISE-FORM-TRIGGER-FAILURE' which I expected
> would reset 'message-code' to NULL or blanks or whatever - something
> other than '40301'. It does not.
>
> Also, most interesting, is a subsequent query which is successful,
 

> does not reset the 'message-code' variable either!
>
> When does 'message-code' get reset? The only work around I have
 thought
> of is to set my own GLOBAL variable on based on the '40301', and then
> set it off after I call 'RAISE-FORM-TRIGGER-FAILURE' so that my GLOBAL
> is the flag I base my processing on, as I don't see how I can
> use 'message-code' as my flag

Sent via Deja.com
http://www.deja.com/ Received on Wed Jan 10 2001 - 23:02:10 CET

Original text of this message