Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Oracle Form 5

Posted on 2001-06-30
5
Medium Priority
?
1,635 Views
Last Modified: 2012-06-27
I want to supress the default message 'Do you want to save changes?' in Oracle Form 5. how to do that?

Thanks
Abdul Qadir Khan
0
Comment
Question by:aqk139
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 6

Accepted Solution

by:
M-Ali earned 600 total points
ID: 6241907
When are you getting this message?

For suppressing normal messages in forms, you can set
:SYSTEM.MESSAGE_LEVEL := value

But prompts and vital error messages cannot be suppressed using this.

If you want to clear a form without saving use, CLEAR_FORM(NO_VALIDATE);


Ali
0
 
LVL 2

Expert Comment

by:noriegaa
ID: 6243709
You could also use exit_form(no_validate); or simply exit(no_validate);
0
 

Expert Comment

by:schudasama
ID: 6243965
Hi,

This is how i have done and it works. Create a save button. In the when button_pressed trigger
declare
 al_button number;
 al_id ALERT := find_alert('caution');
begin
 if :global.insertupdateflag = 1 then
   (globally defined variable)
 set_alert_property('caution',alert_message_text,'Do You want to save the changes (Y/N) ?');
 set_alert_button_propert(al_id,alert_button1,label,'Yes');
 set_alert_button_property(al_id,alert_button2,label,'No');
 al_button := show_alert(al_id);
 if al_button = alert_button1 then
   goto commitblock;
 else
   goto endblock;

<<commitblock>>
:global.errcode = 0 then
 commit;
if :global.errcode = 1 then
 goto endblock;
end if;

<<endblock>>
null;

end

here the commitblock is where you are saving the changes. if the errorcode (errcode) is 0 then it will commit otherwise it will go to the endblock and wll not commit the changes.

Hope this will help you.

0
 

Expert Comment

by:schudasama
ID: 6243968
Hi,

This is how i have done and it works. Create a save button. In the when button_pressed trigger
declare
 al_button number;
 al_id ALERT := find_alert('caution');
begin
 if :global.insertupdateflag = 1 then
   (globally defined variable)
 set_alert_property('caution',alert_message_text,'Do You want to save the changes (Y/N) ?');
 set_alert_button_propert(al_id,alert_button1,label,'Yes');
 set_alert_button_property(al_id,alert_button2,label,'No');
 al_button := show_alert(al_id);
 if al_button = alert_button1 then
   goto commitblock;
 else
   goto endblock;

<<commitblock>>
:global.errcode = 0 then
 commit;
if :global.errcode = 1 then
 goto endblock;
end if;

<<endblock>>
null;

end

here the commitblock is where you are saving the changes. if the errorcode (errcode) is 0 then it will commit otherwise it will go to the endblock and wll not commit the changes.

Hope this will help you.

0
 
LVL 2

Expert Comment

by:racher
ID: 6244558
Are you wanting to save and exit or cancel and exit?

Route all exiting via one form procedure
If you want to cancel and exit use EXIT_FORM(NO_VALIDATE) as suggested.
If you want to save and exit use COMMIT;
You may want to hide the messages
40400 : transaction complete: x records applied and saved
40401 : no changes to save
You can do this by putting something in the form on-message trigger that examines the MESSAGE_CODE and then supresses the messages that you want to supress.

Graham
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question