Solved

Oracle Form 6i error messages

Posted on 2002-04-10
6
3,697 Views
Last Modified: 2012-05-04
How can i handle error messages. when inserting a record in a block it makes a "tot" sound how can get rid of that?
please give me a code....
0
Comment
Question by:aerokevs
6 Comments
 
LVL 5

Expert Comment

by:sora
ID: 6931116
I got the below from Oracle Metalink:

In the Forms Designer go to Tools-->Preferences, select Runtime tab, check the Quiet Mode option.

If using the web forms version, then.....

<PARAM NAME="serverArgs"
        VALUE="module=myform.fmx quiet=yes"


sora
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6932520
A few of these questions are current, but others quite old with previous follow up requests to you.

ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if still open in seven days.  Please post closing recommendations before that time.

Question(s) below appears to have been abandoned. Your options are:
 
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process for further information, if needed.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE KnowledgePro user, use the Power Search option to find them.  Anytime you have questions which are LOCKED with a Proposed Answer but does not serve your needs, please reject it and add comments as to why.  In addition, when you do grade the question, if the grade is less than an A, please add a comment as to why.  This helps all involved, as well as future persons who may access this item in the future to seek help.

To view your open questions, please click the following link(s) and keep them all current with updates.
http://www.experts-exchange.com/questions/Q.20150896.html
http://www.experts-exchange.com/questions/Q.20281065.html
http://www.experts-exchange.com/questions/Q.20285996.html
http://www.experts-exchange.com/questions/Q.20285989.html
http://www.experts-exchange.com/questions/Q.20286956.html
http://www.experts-exchange.com/questions/Q.20286949.html
http://www.experts-exchange.com/questions/Q.20286951.html


To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20129863.html
http://www.experts-exchange.com/questions/Q.20249971.html

**** PLEASE DO NOT AWARD THE POINTS TO ME. *****
 
------------>  EXPERTS:  Please leave your closing recommendations if this item remains inactive another seven (7) days.  If you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
POINTS FOR EXPERTS awaiting comments are listed here -> http://www.experts-exchange.com/commspt/Q.20277028.html
 

Moderators will finalize this question if still open in 7 days, by either moving this to the PAQ (Previously Asked Questions) at zero points, deleting it or awarding expert(s) when recommendations are made, or an independent determination can be made.  Expert input is always appreciated to determine the fair outcome.
 
Thank you everyone.
 
Moondancer
Moderator @ Experts Exchange
0
 
LVL 22

Expert Comment

by:Helena Marková
ID: 6933447
If you want to suppress error messages then you have to set a system variable  :system.message_level. I use to set this system variable in a Pre-Form trigger. There is no restriction in using this variable. You can set it to difference values in each Pre-Block triggers if you want.

SYSTEM.MESSAGE_LEVEL stores one of the following message severity levels: 0, 5, 10, 15, 20, or 25. The default value is 0. Form Builder does not suppress prompts or vital error messages, no matter what severity level you select.

Assume that you want Form Builder to display only the most severe messages (level 25).  The following Pre-Form trigger suppresses all messages at levels 20 and below.

:System.Message_Level := '20';

If you want to display your own message then it can be done in On-Message and On-Error triggers.
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

Author Comment

by:aerokevs
ID: 6933750
Henka, can you give me an example on how it is done.. in On-Message and On-Error.
0
 
LVL 22

Accepted Solution

by:
Helena Marková earned 50 total points
ID: 6936097
This is an On-Message trigger:

DECLARE
  mestype VARCHAR2(3) := MESSAGE_TYPE;
  mescode NUMBER := MESSAGE_CODE;
  mestxt VARCHAR2(80) := MESSAGE_TEXT;
  alert_button number;
BEGIN
  IF mescode = 40400 THEN
    mestxt := 'aaa';
  ELSIF mescode = 40404 THEN
    mestxt := 'bbb';
  ELSIF mescode = 40406 THEN
    mestxt := 'ccc';
  ELSIF mescode = 40407 THEN
    mestxt := 'ddd';
  ELSE
    mestxt := mestype||'-'||to_char(mescode)||': '||mestxt;
  END IF;

    Set_Alert_Property('spr', alert_message_text, mestxt );
    alert_button := Show_Alert('spr');

END;

This is an On-Error trigger:

begin
  set_application_property(CURSOR_STYLE,'DEFAULT');
  formular_error;
EXCEPTION
  WHEN OTHERS THEN
  CGTE$OTHER_EXCEPTIONS;
end;

procedure FORMULAR_ERROR is
    err_code        CONSTANT NUMBER      := ERROR_CODE;
    err_type        CONSTANT VARCHAR2(3) := ERROR_TYPE;
    err_txt            VARCHAR2(300)                  := substr(ERROR_TEXT,1,300);
    server_err      NUMBER                         := abs(DBMS_ERROR_CODE);
    server_msg      VARCHAR2(2000)                 := DBMS_ERROR_TEXT;
BEGIN
    IF err_type = 'FRM' AND
     err_code in (40502,40503,40504,40505,40506,40507,40508,40509,
                   40510,40511,40512,40513,40514,40515) THEN
     oracle_error(server_err,server_msg);
    ELSE
     klient_error(err_code,err_type,err_txt);
    END IF;
END FORMULAR_ERROR;

PROCEDURE KLIENT_ERROR (errcd number,errtp varchar2,errtx varchar2) IS
  errtype      VARCHAR2(3) := errtp;
  errcode      NUMBER := errcd;
  errtxt       VARCHAR2(300) := errtx;
  alert_button number;
  forma        VARCHAR2(30) := :system.current_form;
  blok         VARCHAR2(30) := :system.current_block;
  polozka      VARCHAR2(30) := :system.current_item;
  al_id            Alert := Find_Alert('chy');

BEGIN
  IF errcode = 40200 THEN
    errtxt := 'aaaa';
  ELSIF errcode = 40201 THEN
    errtxt := 'bbbbbbbb';
  ELSIF errcode = 40202 THEN
    errtxt := 'ccccccc';
  END IF;

  Set_Alert_Property(al_id, alert_message_text, errtxt );
  alert_button := Show_Alert(al_id);

  EXCEPTION
  WHEN OTHERS THEN
  CGTE$OTHER_EXCEPTIONS;

END KLIENT_ERROR;

PROCEDURE oracle_error (sererr number,sermsg varchar2) IS
    server_err NUMBER         := sererr;
    server_msg VARCHAR2(2000) := sermsg;
    al_button  number;
    forma      VARCHAR2(30)   := :system.current_form;
    blok       VARCHAR2(30)   := :system.current_block;
    polozka    VARCHAR2(30)   := :system.current_item;
    al_id          Alert := Find_Alert('chy');
BEGIN
  IF server_msg is not null then
    Set_Alert_Property(al_id, alert_message_text, CGTE$STRIP_FIRST_ERROR(server_msg));
    al_button := Show_Alert(al_id);

  END IF;

  EXCEPTION
  WHEN OTHERS THEN
  CGTE$OTHER_EXCEPTIONS;

END oracle_error;
0
 

Author Comment

by:aerokevs
ID: 6939816
thanks a lot..
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to recover a database from a user managed backup
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.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now