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.
Thanks in advance.
Deepak
-------------------==== Posted via Deja News ====-----------------------
http://www.dejanews.com/ Search, Read, Post to Usenet
>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.
>
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
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
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.
Remove XSPAM from mail_id if replying via email.
Alex Heney, Living in the Global Village.
Hi,
I had a similar problem a few weeks ago, I got the message 'FRM-40405:
No changes to apply' when commiting DML's in a when-button-pressed
trigger. I wanted to suppress this message, because the message was
wrong, there were changes to apply. I made it by settig the
System.Message_Level to 5 in the form with the when-button-pressed
trigger. But it did not work.
Later I found out that the message did not come from the current form,
it came from an other form that was open at the same time. Obviously, in
a multiple form application a commit_form command commits in every form
that is open at the same time.
So if you control the message either with System.Message_Level or whith
an ON_ERROR trigger in every form that could be open at the same time,
it would maby manage your problem.
Hope that helps
Robert Puerzl Siemens AG Austria
When I run my Forms application and save a transaction,
I get the the message FRM-40400 : Transaction complete:1
record applied and saved. But, before that I get another
message FRM-40654:Record has been updated by another user.
Re-query block to see change.I referred the Forms messages
and codes manual which says that another user has updated
this record since I performed a query and has changed at
least one field in the record and my actions have not
changed the record in memory.As per the manual,One possible
action I can take is to re-query to fetch and display the
new record into the form before I can update or delete the
record.
Could anyone explain how to carry out a re-query to fetch
and display the new updated record.(Pls give hints on
trigger,scope,built_in's etc.,)
Thanks in advance
You really should try to avoid re-querying to get around this problem.
You can get into a programming mess. There must be a reason that the
records in your form are becoming out of synch with the database. Are you
sure you are not performing changes on the data using SQL in a form
trigger or procedure, or even a database trigger?
Eoin
On Thu, 02 Oct 1997 20:52:07 -0600, deepa...@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.
>
>Thanks in advance.
>
>Deepak
>
: >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.
: >
: 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
: 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
: 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.
: 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 dfe...@flash.net to be put on the waiting list.
Owner/GM/Manager of the Columbus Capitals
_______________________________________________________________________________
The 40401 can also be caused if you're doing something like
update mytable
set myvar = myval;
commit;
inside of a form.