Home » Developer & Programmer » Forms » FRM-40401 No changes to save error
FRM-40401 No changes to save error [message #110906] Thu, 10 March 2005 19:35 Go to next message
rajesh
Messages: 173
Registered: November 1998
Senior Member
I have updated a table from the form and written a update statement in the when-button-pressed trigger.
while the code is working fine and the table is updated but iam finding this error in the console frm-40401 no changes to save. pls help me why it is coming and what affect it have on my form. i had suppressed this message by writing on-error trigger on form level.
Re: FRM-40401 No changes to save error [message #110911 is a reply to message #110906] Fri, 11 March 2005 00:39 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
The COMMIT (COMMIT_FORM) statement analyses the blocks that exist in your form. If you change a table independently from the declared blocks then the form does not think that it has any changes to save. Hence the message.

Use 'standard.commit' this bypasses any checking and does just that which you asked - commit, now!! Smile

David
icon9.gif  Re: FRM-40401 No changes to save error [message #110919 is a reply to message #110911] Fri, 11 March 2005 01:52 Go to previous messageGo to next message
raj_150879@yahoo.com
Messages: 1
Registered: March 2005
Location: india
Junior Member

Thanks for ur reply.
iam able to do it now! thanks a lot.
plz clarify one point.as you said that

"The COMMIT (COMMIT_FORM) statement analyses the blocks that exist in your form. If you change a table independently from the declared blocks then the form does not think that it has any changes to save. Hence the message."

sir, but i have written the update statement in the when-button-pressed trigger which is under the block .thus i think that i have change the table in the data block and not independently from the block.

--excuse me if it seems stupid as iam a new user of D2K--

Use 'standard.commit' this bypasses any checking and does just that which you asked - commit, now
Re: FRM-40401 No changes to save error [message #110924 is a reply to message #110919] Fri, 11 March 2005 02:48 Go to previous messageGo to next message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
You can bypass this by raising the message level.

DECLARE
  -- Capture the original message level, to reset afterwards.
  v_message_level PLS_INTEGER := :SYSTEM.MESSAGE_LEVEL;
BEGIN
  -- Raise the message level above 5, avoid information messages.
  -- Read the Forms help file for more info
  :SYSTEM.MESSAGE_LEVEL := 5;

  COMMIT_FORM;

  -- Reset the message level to the original value
  :SYSTEM.MESSAGE_LEVEL := v_message_level;
END;


The message means that no database items in the Form have changed, so the BLOCK_STATUS is still in QUERY_STATUS. As a result, for Forms default transaction processing, there's nothing to save.

Alternatively, you can set the record status manually to changed_status, thus avoiding the message.

MHE
Re: FRM-40401 No changes to save error [message #111096 is a reply to message #110906] Sun, 13 March 2005 18:21 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
MHE's suggestion to change the status of the current block to 'CHANGED' is a good idea.

If you only set the MESSAGE_LEVEL higher than 0 be careful that you don't have an exception clause in the execution block because the 'no changes to save' will be trapped by the exception condition and any code after the COMMIT_FORM will be bypassed and the database may not be committed. [This non-commital MAY NO LONGER happen, but it DID happen in some previous versions of Forms.] Always be extremely careful when raising ANY condition, especially when performing maintenance on a highly modified form.

David

[Updated on: Sun, 13 March 2005 18:23]

Report message to a moderator

Re: FRM-40401 No changes to save error [message #628441 is a reply to message #110911] Tue, 25 November 2014 04:55 Go to previous message
gunjansangahi
Messages: 2
Registered: November 2014
Location: INDIA
Junior Member
thank you sir, it worked. Surprised
Previous Topic: Displaying PDF file which is placed on application server through forms 6i by using web.show_documen
Next Topic: ORA-01036: illegal variable name/number
Goto Forum:
  


Current Time: Fri Apr 19 14:52:48 CDT 2024