Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Oracle Form 5

Posted on 2001-06-30
5
Medium Priority
?
1,641 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
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses

879 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