Home » Developer & Programmer » Forms » message irritating me
message irritating me [message #123581] Tue, 14 June 2005 00:49 Go to next message
kamar_19
Messages: 52
Registered: June 2005
Location: pakistan
Member
i m working in oracle 8 and developer 6i,when a press commit button ,a message 'no changes to save' appears.how 2 hide this message.i have tried on error trigger and message level.
Re: message irritating me [message #123587 is a reply to message #123581] Tue, 14 June 2005 01:29 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Setting message_level to 25 _should_ stop this message appearing.

Please show code that you think is giving rise to this message.

David
Re: message irritating me [message #123836 is a reply to message #123581] Wed, 15 June 2005 01:13 Go to previous messageGo to next message
kamar_19
Messages: 52
Registered: June 2005
Location: pakistan
Member
code
:system.message_level:='25';
commit_form;
:system.message_level:='0';
Re: message irritating me [message #123843 is a reply to message #123836] Wed, 15 June 2005 01:41 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I believe that there exists another 'commit_form' and it is giving the message.

David
Re: message irritating me [message #123857 is a reply to message #123843] Wed, 15 June 2005 03:26 Go to previous messageGo to next message
kamar_19
Messages: 52
Registered: June 2005
Location: pakistan
Member
sir,
i also thought that but there is no commit in form level.
there may b some data base problem
Re: message irritating me [message #123859 is a reply to message #123857] Wed, 15 June 2005 03:36 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Okay ... then search for 'commit' (not commit_form) in the whole form including the Program Units, and then check any attached libraries.

Alternatively, add some messages:

code
:system.message_level:='25';
message('before commit'); pause;
commit_form;
message('after commit'); pause;
:system.message_level:='0';


and see whereabouts the 'no changes to save' message appears.

David
Re: message irritating me [message #124410 is a reply to message #123859] Sat, 18 June 2005 03:26 Go to previous messageGo to next message
kamar_19
Messages: 52
Registered: June 2005
Location: pakistan
Member
sir
same message appears when i press f-10 key or save button.
Re: message irritating me [message #124520 is a reply to message #124410] Sun, 19 June 2005 19:33 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Look at the documentation for COMMIT_FORM and it gives the example:

/*
** Built-in: COMMIT_FORM
** Example: If there are records in the form to be
** committed, then do so. Raise an error if the
** commit was not successful.
*/

BEGIN
   /*
   ** Force validation to happen first
   */
   Enter;

   IF NOT Form_Success THEN
      RAISE Form_Trigger_Failure;
   END IF;

   /*
   ** Commit if anything is changed
   */
   IF :System.Form_Status = 'CHANGED' THEN
      Commit_Form;

      /*
      ** A successful commit operation sets Form_Status back
      ** to 'QUERY'.
      */
      IF :System.Form_Status <> 'QUERY' THEN
         Message ('An error prevented your changes from being committed.');
         Bell;
         RAISE Form_Trigger_Failure;
      END IF;
   END IF;
END;


Try that.

David
Previous Topic: Forms not showing data, unless tracing is on
Next Topic: change the width of text item
Goto Forum:
  


Current Time: Fri Sep 20 10:36:25 CDT 2024