Re: FORMS MESSAGES

From: Chad Edwards <cedwards_at_infinet.com>
Date: 1997/10/08
Message-ID: <61h10h$qfj_at_news1.infinet.com>#1/1


Alex Heney (a.j.heney_at_btNOinterSPAMnet.com) wrote:
[Quoted] : On Thu, 02 Oct 1997 20:52:07 -0600, deepakrajan_at_hotmail.com wrote:
 

: >Hi,
: >
: >In my form application, when saving a transaction,I have used the
: >COMMIT_FORM procedure in a When_button_pressed trigger for the save
: >button.When I run the form and press the save button,I get the message
: >FRM-40401: No changes to save instead of the message FRM-40400:
: >Transaction complete:1 record applied and saved.
: >
: >Is there a way to rectify this.At present,I am overriding this message
: >with my own.
: >
 

[Quoted] : If you are getting the message 40401, then the form will not have
: carried out a commit, so no changes will actually have been saved.
 

: The most common reason for getting this when you think you have
: changed things is that you have only changed items with the base=table
: property set to 'FALSE'. If you want FORMS to recognise that something
: has changed, and to carry out the save processing, then you should
: change a base-table item, which can be done just by assigning an item
[Quoted] : to itself (e.g. :blk_xxx:item_yyy := :blk_xxx.item_yyy; ).
 

: If, on the other hand, you just want users to see the same message
: regardless of whether anything was actually saved or not ( presumably
: saying 0 records applied and saved), then messages can be intercepted
[Quoted] : and modified using an ON-MESSAGE trigger. RTFM for details.
 

: --
: The above posting represents the personal opinions of the author and
: is not to be taken as official (or unofficial) policy or opinions of
: his employer.
 

[Quoted] : Remove XSPAM from mail_id if replying via email.
: Alex Heney, Living in the Global Village.

Here's a snippet of code we use in on-error triggers at the form level:

DECLARE

 errcode   NUMBER(5)   := ERROR_CODE;
 errtype   VARCHAR2(3) := ERROR_TYPE;
 errtext   VARCHAR2(78):= ERROR_TEXT;

BEGIN
 IF errcode = 40401 THEN
   NULL;
 ELSIF errcode = 40405 THEN
   NULL;
 ELSE
   MESSAGE(errtype || '-' || TO_CHAR(errcode) || ':' || errtext); END;

--


______________________________________________________________________________
http://www.infinet.com/~cedwards 

Official home of RMBL! http://rmbl.ml.org
E-mail dferry_at_flash.net to be put on the waiting list.
Owner/GM/Manager of the Columbus Capitals
_______________________________________________________________________________
Received on Wed Oct 08 1997 - 00:00:00 CEST

Original text of this message