Form_trigger_failure error?

Help! I'm working on forms in 6.0 that were developed in
4.5, and none of the raise form_trigger_failure exceptions work.
Whenever I raise the exception, I get an "Error - non-Oracle
Exception" error. I haven't worked in 6.0 before, has this
changed? Has the syntax changed? Thanks.
null

Kevin
I seem to be have the same problem.
I get this unhandled exception
PDE-PXC002 Program unit exception aborted due to unhandled exception (100501)
were you able to solve this problem?
thanks
Huzaifa
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Kevin S. ([email protected]):
Help! I'm working on forms in 6.0 that were developed in
4.5, and none of the raise form_trigger_failure exceptions work.
Whenever I raise the exception, I get an "Error - non-Oracle
Exception" error. I haven't worked in 6.0 before, has this
changed? Has the syntax changed? Thanks.<HR></BLOCKQUOTE>
null

Similar Messages

  • Problem while handling When-Validate-Record Trigger in Forms 6i

    I am using below mention code in when validate trigger and use go block loop in when button pressed. if Check_Date_Range gives RAISE Form_Trigger_Failure error user will enter in a loop. kindly provide me solution for below mention problem.
    BEGIN
    Check_Date_Range(:Experiment.Start_Date,:Experiment.End_Date);
    END;
    ** The procedure looks like this
    PROCEDURE Check_Date_Range( d1 DATE, d2 DATE ) IS
    BEGIN
    IF d1 > d2 THEN
    Message('Your date range ends before it starts!');
    RAISE Form_Trigger_Failure;
    END IF;
    END;

    You have more chance to find a response if you post into Forms<br>
    <br>
    Nicolas.

  • ON-ERROR trigger fires with Error_Type null and Error_Code 0

    We've recently seen our 6i Forms application throwing some odd errors, not least of which is when an alert popped up with just "-0:" displayed.
    This seems to come from the ON-ERROR trigger.
    DECLARE
       lv_errcod  NUMBER       := ERROR_CODE;
       lv_errtyp  VARCHAR2(3)  := ERROR_TYPE;
       lv_errtxt  VARCHAR2(80) := ERROR_TEXT;
       lv_dbmserr NUMBER       := DBMS_ERROR_CODE;
       lv_albut   NUMBER;
    BEGIN
      IF (lv_errcod = 40508) THEN
          -- Failure on insert
        IF lv_dbmserr = -1031 THEN
               -- Insufficient Privileges
          Display_Alert( 'You do not have permission to create new records here.');
          Raise Form_Trigger_Failure;
        ELSE
          Display_Alert( 'Unable to create record.');
          Raise Form_Trigger_Failure;
        END IF;     
      ELSIF (lv_errcod = 40510) THEN
          -- Failure on delete
        IF lv_dbmserr = -1031 THEN
               -- Insufficient Privileges
          Display_Alert( 'You do not have permission to delete records here.');
          Raise Form_Trigger_Failure;
        ELSIF lv_dbmserr = -2292 THEN
               -- Integrity Constraint violated
          Display_Alert( 'Cannot delete this record - Data exists on other tables that uses this value.');
          Raise Form_Trigger_Failure;
        ELSE
          Display_Alert( 'Unable to delete record.');
          Raise Form_Trigger_Failure;
        END IF;     
       ELSIF (lv_errcod = 40200) THEN   
          message('This field is protected against update');
      ELSE
        Display_Alert(lv_errtyp||'-'||to_char(lv_errcod)||': '||lv_errtxt);
        RAISE Form_Trigger_Failure;
      END IF;
    END;At least there's nowhere else that could be doing it. It seems that error_type and error_text are null and error_code is 0
    It's as if the ON-ERROR trigger has fired but there isn't an error. Anyone ever experienced this? It's been ported to a VM environment but ran perfectly fine for 6 months and has only started doing this in the last few days.
    It's also occasionally saying that queries return no results when the users KNOW there are records, and if they log out completely and log back in the records are returned, which is doing nothing for their confidence in the application.
    It's entirely possible that one of the teams responsible for various parts of the VM environment or network, or even the DBAs, has done something that caused it but we're unlikely to get them to admit it without knowing what it could be. I would expect a dropped connection or network issue to give an appropriate error, not freak out.
    Edited by: Dave Hemming on Jul 22, 2010 9:48 AM
    Edited by: Dave Hemming on Jul 22, 2010 9:49 AM

    Bit of a breakthrough - we had it again and it appears to then be followed - depending on which form they're in - by an ORA-02396 and an error that built-in DBMS_ERROR_CODE has failed. We are now suspecting that it's down to the Idle Time for the profile - the users session has been dropped but the form hasn't realised it's not connected. It looks like the users idle time has been amended from UNLIMITED to 90 in the last few days.
    Nobody thought it important to tell us, mind...
    Edited by: Dave Hemming on Jul 22, 2010 1:15 PM

  • Calling report from FORM - error Invalid value of paramente 'P_YEAR'

    Hi guys,
    Could you please help me to figure out what is going wrong
    with my form which run a report?
    I am using Developer suite 10g.
    when i run report from report application it run fine,
    but when i call that report from a form it gives me error.
    I have checked the datatype, checked the parameter value
    that I assign from form is available in the report parameter value.
    What else do i have to check in order to run this report
    from the form.
    Error Message from Report Queue Manager:
    Invalid value for parameter 'P_YEAR'.
    Your insight will be appreciated.

    Thank you for reply Denis,
    Here is the code which run_report from form.
    DECLARE
    -- variables for running individual reports
    report_filename               VARCHAR2(40);
    var_reportpath               VARCHAR2(100);
    report_otherparms      VARCHAR2(200);
    -- variables to keep track of successful reports in silent mode
    rep_status                         VARCHAR2(40);
    rep_req                                   NUMBER := 0;
    rep_count                              NUMBER := 0;
    dummy                                        NUMBER;
    -- variables to load the report names and checkboxes into the parameter list
    pl_id                                        PARAMLIST;
    plname                                   VARCHAR2(20) := 'rpt_list';
    -- variables to loop through the parameter list and run the reports
    i                                                  NUMBER;
    split_loc                              NUMBER;
         param_value                         VARCHAR2(40);
         checkbox_name                    VARCHAR2(40);
         report_basename               VARCHAR2(40);
         svc_name                              VARCHAR2(4);
         run_report                         BOOLEAN;
         disp_exist BOOLEAN := get_current_service_count( :global.filename_prefix, 'DISP',
                        :reports_control.year_list, :reports_control.quarter_list,
                        :reports_control.group_list );
    hosp_exist BOOLEAN := get_current_service_count( :global.filename_prefix, 'HOSPICE',
                        :reports_control.year_list, :reports_control.quarter_list,
                        :reports_control.group_list );
    orth_exist BOOLEAN := get_current_service_count( :global.filename_prefix, 'O/P',
                        :reports_control.year_list, :reports_control.quarter_list,
                        :reports_control.group_list );
    BEGIN
    -- Are any reports selected?
    IF BOXES_ARE_CHECKED(:System.Cursor_Block,'PRINT_NULL_REPORT') THEN
    if not CHECKBOX_CHECKED('print_null_report') then
    disp_exist := TRUE;
    orth_exist := TRUE;
    hosp_exist := TRUE;
    end if;
    -- Create Report Parameter Listing
    pl_id := GET_PARAMETER_LIST(plname);
    if NOT ID_NULL(pl_id) then
         DESTROY_PARAMETER_LIST(pl_id);
    end if;
    pl_id := CREATE_PARAMETER_LIST(plname);
    if ID_NULL(pl_id) then
         GENERIC_ALERT('Error creating report listing');
         RAISE Form_Trigger_Failure;
    end if;
    ADD_PARAMETER(pl_id,'id1', TEXT_PARAMETER,'cover_page_intro!INTRO');
    ADD_PARAMETER(pl_id,'id2', TEXT_PARAMETER,'utilization_profile!ALLUTIL');
    ADD_PARAMETER(pl_id,'id3', TEXT_PARAMETER,'utilization_summary!ALL_SUMMARY');
    ADD_PARAMETER(pl_id,'id4', TEXT_PARAMETER,'hiv_profile!HIV_PROFILE');
    ADD_PARAMETER(pl_id,'id5', TEXT_PARAMETER,'wound_care_profile!WOUND_CARE_PROF');
    ADD_PARAMETER(pl_id,'id6', TEXT_PARAMETER,'top_10_diagnosis!TOP10DIAG');
    ADD_PARAMETER(pl_id,'id7', TEXT_PARAMETER,'diagnosis_profile!DIAG_PROFILE');
    ADD_PARAMETER(pl_id,'id8', TEXT_PARAMETER,'physician_profile!PHYS_PROFILE');
    ADD_PARAMETER(pl_id,'id9', TEXT_PARAMETER,'physician_specialty!PHYS_SPECIALTY');
    ADD_PARAMETER(pl_id,'id10',TEXT_PARAMETER,'discharge_profile!DISCHARGE_PROFILE');
    ADD_PARAMETER(pl_id,'id11',TEXT_PARAMETER,'acute_care_discharge!ACUTE_DSCHRG');
    ADD_PARAMETER(pl_id,'id12',TEXT_PARAMETER,'excessive_cost_patients!EXCESSIVE_COST');
    ADD_PARAMETER(pl_id,'id13',TEXT_PARAMETER,'provider_profile!PROV_PROFILE');
    ADD_PARAMETER(pl_id,'id14',TEXT_PARAMETER,'service_profile!SERVICE_PROFILE');
    ADD_PARAMETER(pl_id,'id15',TEXT_PARAMETER,'age_gender_profile!AGE_GENDER_PROF');
    ADD_PARAMETER(pl_id,'id16',TEXT_PARAMETER,'network_services!NETWORK_SERVICES');
    ADD_PARAMETER(pl_id,'id17',TEXT_PARAMETER,'thh_section_header!THH_COVER');
    ADD_PARAMETER(pl_id,'id18',TEXT_PARAMETER,'thh_utilization!THH_UTILIZATION');
    ADD_PARAMETER(pl_id,'id19',TEXT_PARAMETER,'thh_service_profile!THH_SVC_PROF');
    ADD_PARAMETER(pl_id,'id20',TEXT_PARAMETER,'hit_section_header!HIT_COVER');
    ADD_PARAMETER(pl_id,'id21',TEXT_PARAMETER,'hit_utilization!HIT_UTILIZATION');
    ADD_PARAMETER(pl_id,'id22',TEXT_PARAMETER,'hit_service_profile!HIT_SVC_PROF');
    ADD_PARAMETER(pl_id,'id23',TEXT_PARAMETER,'hme_section_header!HME_COVER');
    ADD_PARAMETER(pl_id,'id24',TEXT_PARAMETER,'hme_utilization!HME_UTILIZATION');
    ADD_PARAMETER(pl_id,'id25',TEXT_PARAMETER,'hme_service_profile!HME_SVC_PROF');
    ADD_PARAMETER(pl_id,'id26',TEXT_PARAMETER,'disp_section_header!DISP_COVER');
    ADD_PARAMETER(pl_id,'id27',TEXT_PARAMETER,'disp_utilization!DISP_UTILIZATION');
    ADD_PARAMETER(pl_id,'id28',TEXT_PARAMETER,'disp_service_profile!DISP_SVC_PROF');
    ADD_PARAMETER(pl_id,'id29',TEXT_PARAMETER,'hosp_section_header!HOSP_COVER');
    ADD_PARAMETER(pl_id,'id30',TEXT_PARAMETER,'hosp_utilization!HOSP_UTILIZATION');
    ADD_PARAMETER(pl_id,'id31',TEXT_PARAMETER,'hosp_service_profile!HOSP_SVC_PROF');
    ADD_PARAMETER(pl_id,'id32',TEXT_PARAMETER,'orth_section_header!ORTH_COVER');
    ADD_PARAMETER(pl_id,'id33',TEXT_PARAMETER,'orth_utilization!ORTH_UTILIZATION');
    ADD_PARAMETER(pl_id,'id34',TEXT_PARAMETER,'orth_service_profile!ORTH_SVC_PROF');
    ADD_PARAMETER(pl_id,'id35',TEXT_PARAMETER,'encounter_detail!ENCOUNTER_DETAIL');
    --- set up other parameters to send to generate_report
    if :reports_control.output_choices = 'FILE' then
    var_reportpath := :global.report_directory || :reports_control.year_list;
    if :global.filename_suffix <> '_A10G' then
         var_reportpath := var_reportpath || 'q' || :reports_control.quarter_list;
    end if;
    var_reportpath := var_reportpath || '_G' || :reports_control.group_list || '_';
    else
         var_reportpath := '';
    end if;
    report_otherparms := 'p_year='||:reports_control.year_list;
    if :global.filename_suffix <> '_A10G' then
         report_otherparms := report_otherparms || '     p_quarter='||:reports_control.quarter_list;
    end if;
    report_otherparms := report_otherparms || ' P_REPORTGROUPID='||:reports_control.group_list;
    --- Check if reports are checked and submit to Reports Server
         for i in 1..35 loop
              GET_PARAMETER_ATTR(pl_id,'id'||i,dummy,param_value);
              split_loc := instr(param_value,'!');
              checkbox_name := substr(param_value,1,split_loc-1);
              report_basename := substr(param_value,split_loc+1,length(param_value));
    if CHECKBOX_CHECKED(checkbox_name) then
         run_report := TRUE;
         svc_name := substr(report_basename,1,4);
         if svc_name = 'DISP' then
              if not disp_exist then
                   run_report := FALSE;
              end if;
         elsif svc_name = 'ORTH' then
              if not orth_exist then
                   run_report := FALSE;
              end if;
         elsif svc_name = 'HOSP' then
              if not hosp_exist then
                   run_report := FALSE;
              end if;
         end if;
         if run_report then
              report_filename := :global.filename_prefix || report_basename || '_10G';---- :global.filename_prefix || report_basename || :global.filename_suffix;
         GENERIC_ALERT(report_filename || ' ' || report_otherparms);
              rep_status := GENERATE_REPORT(report_filename,:reports_control.output_choices,var_reportpath,report_otherparms);
              rep_req := rep_req + 1;
              if rep_status = 'FINISHED' then
                   rep_count := rep_count + 1;
              end if;
         end if;
         end if;
         end loop;
    -- if we're in silent mode, display a completion message
         if :reports_control.output_choices = 'FILE' and CHECKBOX_CHECKED('chk_silent') then
              SET_ALERT_PROPERTY('REPORT_CREATED',alert_message_text,
         '' || rep_count || ' of ' || rep_req || ' reports created successfully');     
              dummy := SHOW_ALERT('REPORT_CREATED');
    end if;
    ELSE
    dummy := SHOW_ALERT('select_report');
    END IF;
    END;

  • Error while creating the Ole Object (MSN Messenger)

    Hi,
    We are trying to send a mail by invoking MSN Messenger. We have imported "Messenger.MsgrObject" OLE Object and written the following code to logon to the Messenger.
    DECLARE
         MSGOBJ123 OLEOBJ;
         SRVOBJ123 OLEOBJ;
         SRVOBJ1234 OLEOBJ;
    BEGIN
         MSGOBJ123 := CREATE_OLEOBJ('Messenger.MsgrObject');
    -- Get all the services from the Messenger Object
         SRVOBJ123 := Messenger_IMsgrObject.Services(MSGOBJ123);
    -- Get one of the services
         SRVOBJ1234 := Messenger_IMsgrServices.Item(SRVOBJ123, 0);
         IF :TXTUSR = NULL THEN
         MESSAGE('User Name cannot be null');
         RAISE FORM_TRIGGER_FAILURE;
         ELSIF :TXTPWD = NULL THEN
         MESSAGE('Password cannot be null');
         RAISE FORM_TRIGGER_FAILURE;
         ELSE
    -- Log on to the Messenger By passing the MsgObject,
    -- User Name, password, Service Object
         Messenger_IMsgrObject.LogOn(MSGOBJ123, :LOGINBLK.TXTUSR, :LOGINBLK.TXTPWD, SRVOBJ1234);
         END IF;
    END;
    We get this error while executing this program
    "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-100504"
    Please advice whether there is way to solve this problem or any other method of accessing MSN Messenger.
    Thanks
    Vishwanath

    do a check on the wsdl file and how you are passing values in the proxy. The tags for XML are not correct. Open the WSDL in IE and see there must be an error. Or probably when passing the actual values to the XML generated each element is not closed properly. Error says tags dont match.
    Edited by: Kshamatha Eda on Mar 5, 2010 10:54 AM

  • Error message from new_block_instance freezes form

    I show a message in the new block_instance of a form by using fnd_message.error. The messages shows up fine but the form freezes after that. Following is the code :
    if name_in('promise_demand.atp_error_message') is not null then
    fnd_message.set_string(name_in('promise_demand.atp_error_message'));
              fnd_message.error;
              copy(null, 'promise_demand.atp_error_message');
              --raise form_trigger_failure;
              go_item('promise_demand.sales_date');
         end if;
    I tried using raise form trigger failure , it doesnt work , the go_item also causes the form to freeze.
    Please help, how can i show this message and return control to the form.
    thanks

    Any ideas please ? The problem is that the control does not go to message popup . The OK button on the error message popup is disabled. So I am not able to click on it to hide it .
    Even if I dont give the go_item('promise_demand.sales_date');
    it's the same.
    Please help.

  • Error while compiling program unit

    Hi All,
    I am working on oracle forms 10g.
    I am getting an error "wrong no or types of arguments in call to 'COUNTCDRSTODELETE' ", while trying to compile my program unit.
    The extract of my program unit is as written below:
    PROCEDURE CALL_PCK_BACKOUT IS
    -- type bmpf_id_arr is varray(100) of bmp_files.bmpf_id%type;
    type bmpf_id_arr is varray(100) of integer;
    id_arr bmpf_id_arr := bmpf_id_arr();
    file_cnt number := 0;
    BEGIN
    GO_BLOCK('B_FILE');
    first_record;
    LOOP
         --     EXIT WHEN :SYSTEM.RECORD_STATUS='NEW';
              IF UPPER(:B_FILE.FILE_ON_OFF_IND) = 'Y' THEN
         FOR I IN ( SELECT BMPF_ID FROM BMP_FILES
                             WHERE BMPF_FILENAME = :B_FILE.BMPF_FILENAME
                             AND BMPF_PROCESSING_STATE = 'P'
                             ORDER BY BMPF_ID ASC)
         LOOP
              if file_cnt < id_arr.limit then
                   id_arr.extend;
                   id_arr(id_arr.last) := i.bmpf_id;                
                   INSERT INTO bmp_files_to_backout (file_id, job_id) values (i.bmpf_id,pkg_constants.gt_bat_code_bckout_cdr);
                   file_cnt := file_cnt + 1;
              else
                   msg_alert('You can select maximum 100 files at a time','E',FALSE);
                   RAISE FORM_TRIGGER_FAILURE;     
              end if;                                         
         END LOOP;
         END IF;
         EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
         NEXT_RECORD;
    END LOOP;
    if file_cnt = 0 then
         msg_alert('Please select at least one file in order to initiate the backout','E', FALSE);
         go_item('b_ctrl.file_name');
         RAISE FORM_TRIGGER_FAILURE;     
    end if;
    if file_cnt > 0 then
    commit;
    end if;
    -- check if the backout request has been accepted or not
    if pck_backout.CountCDRStodelete(id_arr,file_cnt) = 0 and pck_backout.AreallCDRSOpen(id_arr,file_cnt) = 0 then
         msg_alert('Backout request can be scheduled for the selected input','E',FALSE);
    elsif     pck_backout.CountCDRStodelete(id_arr,file_cnt) != 0 and pck_backout.AreallCDRSOpen(id_arr,file_cnt) != 0 then
         msg_alert('Backout request has been rejected due to maximum number of cdrs exceeded and not all cdrs belonging to open invoices','E',FALSE);
         RAISE FORM_TRIGGER_FAILURE;
    elsif     pck_backout.CountCDRStodelete(id_arr,file_cnt) != 0 then
    msg_alert('Backout request has been rejected due to maximum number of cdrs exceeded','E',FALSE);
    RAISE FORM_TRIGGER_FAILURE;
    elsif pck_backout.AreallCDRSOpen(id_arr,file_cnt) != 0 then
         msg_alert('Backout request has been rejected due to not all cdrs belonging to open invoices','E',FALSE);
         RAISE FORM_TRIGGER_FAILURE;
    end if;
    END;
    pck_backout is a stored database package. The definition of two functions used above is as given below:
    FUNCTION countcdrstodelete (
    p_bmpf_id_array IN pkarray,
    p_batch_size IN NUMBER
    RETURN NUMBER;
    FUNCTION areallcdrsopen (p_bmpf_id_array IN pkarray, p_batch_size IN NUMBER)
    RETURN NUMBER;
    where pkarray is defined as :
    TYPE pkarray IS VARRAY (100) OF INTEGER;
    Can anyone please tell me why i am getting wronf type or no of arguments error while calling the databse functions.
    I guess, it has to do with the varray field. Can you please tell me if i am using any wrong syntax??
    I request all the forms gurus to please help me with this.

    Hi Fabrio,
    I solved my problem.
    I'd to actually define pkarray as sql type rather than PL/SQL type.
    It's because oracle forms wasn't able to bind the varray defined locally in program unit with the varray defined in stored PL/SQL function.
    Once i created pkarray as sql type and removed the declaration of varray in program unit and PL/SQL code, it worked.
    Thanks for your reply though.
    Regards,
    Navnit

  • Display error message in forms from function "verify_function"

    Hi,
    We have a number of users with our own created profile attached to them.
    We have enabled the 'PASSWORD_VERIFY_FUNCTION' for our own profile.
    Function "verify_function" is used to validate a user's password.
    In "verify_function" we have used "raise_application_error" message in case password validation fails.
    Example:
    raise_application_error(-20001,'Password must be minimum 8 characters in length and maximum 30 characters long');Question) "raise_application_error" displays the error message only in SQL Plus prompt. How do I display the same message from Oracle forms?.
    I have used DBMS_ERROR_TEXT & DBMS_ERROR_CODE in ON-ERROR trigger. This is not displaying the error message in forms in case validation failed in "verify_function". Oracle simply clears the username/password field with a new window. We want to display the error message that occured in "verify_function".
    Thanks

    use the following code in validating the item, e.g when-button-pressed
    begin
    verify_function;
    exception
    when others then
    message(sqlerrm);
    raise form_trigger_failure;
    end ;
    OR
    instead of writing a procedure rewrite it as a function to return 1 if password is correct or 0 if password is wrong
    Regards
    Jihad

  • No data found Error

    Hi all ,
    Following code throwing no data found error.
    It is working properly for IF x <> 0 condition but when count(*) is 0 then it's thrrowing error.
    earlier same code working properly as our client is using this application.
    code on when_button_pressed trigger:
    DECLARE
    user1 VARCHAR2(20);
    x NUMBER(4);
    BEGIN
    FOR c1 IN( SELECT COUNT(*) x
    FROM vinay.file_proc
    WHERE sector = :sector
    and block = :block1
    and plot_no= :plotno
    and plot_size = :plotsize)
    LOOP
    x := c1.x;
    END LOOP;
    IF x <> 0 THEN
    MESSAGE('Record Exists');
    MESSAGE(' ');
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    MESSAGE(' after if');
    MESSAGE(' after if');
    win_api_utility.copy_file(ltrim(rtrim(:ADRIVE1)),ltrim(rtrim(:DESTINATION)),TRUE,TRUE);
    MESSAGE(' copy file');
    MESSAGE(' ');
    SELECT user INTO user1 FROM DUAL;
    INSERT INTO vinay.file_proc values(:sector,:block1,:plotno,:plotsize,user1,sysdate);
    COMMIT;
    MESSAGE(' ');
    CLEAR_BLOCK(NO_VALIDATE);
    END;
    :block2.path1:=:global.drive1;
    GO_ITEM('BLOCK2.ADRIVE');

    Hi,
    I think there is a problem with WIN_API_UTILITY.copy_file can anybody tell me if there is any restriction with this package.

  • Frm-41211 SSS error

    When i'm running the reports from a form under Forms6i it is
    giving an error like
    FRM:41211 integration error.SSL failure running another product.
    please give me the solution.

    You can also read this document from Metalink:
    PURPOSE
    Running multiple Reports from Forms in Asynchronous Mode.
    Problem Description
    If you run multiple Reports from Forms e.g. in a loop with
    Run_report_object or Run_product and the Communicaton Mode
    is Asynchronous you will get Error FRM-41211 INTEGRATION ERROR:
    SSL FAILURE RUNNING ANOTHER PRODUCT.
    Solution Description
    Workaround:
    Use ON-ERROR trigger on forms-level as follows:
    DECLARE
    lv_errcode number := error_code;
    lv_errtype varchar2(3) := error_type;
    lv_errtxt varchar2(80) := error_text;
    BEGIN
    IF (lv_errcode = 41211) THEN
    null;
    ELSE
    message(lv_errtype || '-' || to_char(lv_errcode) || ': ' ||
    lv_errtxt);
    raise form_trigger_Failure;
    END IF;
    END;
    Related Document
    Bug: 914477
    Note: 1018967.102
    Helena

  • Hnadling sql error messages in forms

    Hi there,
    I have a multi block application. I have a check constraint in the database which checks for value > 0 and not null.
    Now in the form if i try to insert/update a null into the column, i get FRM-40735 Onerror raised unhandled exception. When i click on Display error it shows the constraint violated. I want to show the constraint when user clicks on save button i.e commits form.
    In the on error trigger, both block and form level i have
    DECLARE
         lv_errcod NUMBER := ERROR_CODE;
         lv_errtyp VARCHAR2(300) := ERROR_TYPE;
         lv_errtxt VARCHAR2(800) := ERROR_TEXT;
    BEGIN
    if lv_errcod = 40509 or 40508 then
              message(' bad update');
    else     
    Message(lv_errtyp||'-'||to_char(lv_errcod)||': '||lv_errtxt);
         Raise form_trigger_failure;
    end if;
    END;
    I dunno why i get unhandled exception.
    Any help is appreciated.
    Thanks

    I'm not sure what your question is but if it's how to get the same error as
    display error, then put in:
    display_error in an on_error trigger on the block(s):
    for example on_error trigger:
    declare
         errnum number := ERROR_CODE;
         errtxt varchar2(80) := ERROR_TEXT;
         errtype varchar2(3) := ERROR_TYPE;
         field_name varchar2(30);
    begin
         field_name := substr(:system.trigger_field,instr(:system.trigger_field,'.') + 1);
         mess( 'ERROR ' || field_name || ': ' ||errtxt);
         display_error;
         raise form_trigger_failure;
         end;
    **** mess is a routine I include for which you need to define an alert of style NOTE.
    PROCEDURE mess (mymess varchar2) is
    alert_value number;
    BEGIN
    set_alert_property('DATA_ALERT',ALERT_MESSAGE_TEXT,
    mymess);
         synchronize;
         bell;
         alert_value := SHOW_ALERT('DATA_ALERT');
    END;

  • Problem with ora-28000 error

    Hi all,
    I got a problem with ORA-28000 in my form. In my app, it allows user to try maximum 3 time to logon, if the user fails, his/her user will be locked. The problem is, when Oracle locked that user, in on-error trigger I cannot catch that error and show the error message.
    Anybody, please give me a hand.
    Thank alot

    I put code (in the on-error trigger) here. please have look, thanks again.
    IN_ERR_CODE NUMBER := ERROR_CODE;
    BEGIN
         IF(IN_ERR_CODE = 28001) THEN
         ELSIF (IN_ERR_CODE = 28002) THEN
         ELSIF (IN_ERR_CODE = 28011) THEN
         ELSIF (IN_ERR_CODE = 28000) THEN
              MESSAGE(ERROR_TEXT);
              --LEAVE_FORM;
              --clear_form(no_validate);
              --RAISE FORM_TRIGGER_FAILURE;
              --EXIT_FORM(NO_VALIDATE);
         END IF;
    END;

  • Messages in on-error coming more than once.

    Hi
    Iam working in Forms 10g.
    Iam over-riding on-error and on-message triggers in my form.
    Assume below as my on-error code:
    message(error_type || '-' || to_char(error_code));
    I have a date item with below code in its key-next-item trigger.
    if :blk.item1 > sysdate then
    Message('greater than sydate);
    end if;
    if :blk.item1 < sysdate then
    Message('less than sydate);
    end if;
    Here is my issue:
    I run the form and give a negative test case for the date field, ie. enter value 'asdf' for the date field.
    Now iam getting on-error fired twice and getting the error message twice. ie. am getting on-error fired as many times i refer the date item in the key-next-item trigger.
    But i need to get the error only once and not twice or thrice.
    Please suggest me how to solve this.
    Thanks
    Sriram

    Thanks
    I tried both raise form_trigger_failure as well as return but still am getting on-error firing as many times the field reference in the trigger. We are doing maintenance of client's application and i cannot remove the existing key-next-item functionality.
    The client application has lot of validations in key-next-item and post-change. Whenever we face date validations in these triggers, we are getting on-error fired as many times the number of date field reference in the trigger.
    Iam trying to fix the issue in on-error itself but i couldn't. As of now i found a work-around which is given below.
    In on-error i have below code:
    show_alert(error_message);
    if error_code in (50025,50026) then
    raise form_trigger_failure;
    end if;
    So when ever i get "Invalid date" error, iam making the form status failure.
    In my key-next-item
    if :blk.item1 > sysdate then
    Message('greater than sydate);
    end if;
    IF NOT FORM_SUCCESS THEN
    RAISE FORM_TRIGGER_FAILURE;
    END IF;
    if :blk.item1 < sysdate then
    Message('less than sydate);
    end if;
    (Note: The code in upper case is the one that i added newly.
    So if i give an invalid date for :blk.item1 iam getting on-error fired, then iam making form status failure, then in key-next-item iam checking if form status is failure then raise. )
    This is just an work around but practically it is not possible for me to give this work around in so many triggers, it will be great if i can able to raise the error only 1 time in on-error.
    I think i have stated the issue clearly. Please help me to give a fix in on-error itself.
    Thanks
    Sriram

  • Error Handling in Forms

    Dear all,
    we are using oracle developer suite 10g r2 with oracle database 10g r2 against windows server 2003.
    Error handling is a very big issue.
    i try to do the following, just correct me, or make the trigger more efficient.
    i face unexpected messages, like a message two time displayed, sometime important message never displayed.
    i just set the :system.message_level =20 in the when-new-form-instance trigger.
    and create on-error trigger like below
    declare
    errcode number:=error_code;dbmserrcode number;dbmserrtext varchar2(200);
    formtxt varchar2(200);
    errtype varchar2(3);
    begin
    --------- user defined database exceptions errors raised by --RAISE_APPLICATION_ERROR
    IF DBMS_ERROR_CODE in (-20738,.......) then
    raise form_trigger_failure;
    end if;
    if error_code=50017 then
    message('duration must be between 0 and 23');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif
    error_code=40202 then
    clear_message;
    message('please provide the required fields.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif error_code=50022 then
    clear_message;
    message('time must be in the correct format.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    if error_code in (40509,40508) then
    dbmserrcode:=dbms_error_code; dbmserrtext:=dbms_error_text;
    if dbmserrcode=-1438 then
    clear_message;
    message('your number is too large.try again.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-1400 then
    clear_message;
    message('your forgot to provide a value.try again.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-2291 then
    clear_message;
    message('header is not found for this insertion.');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    elsif dbmserrcode=-1 then
    clear_message;
    message('record already exists');message(' ',no_acknowledge);
    raise form_trigger_fialure;
    else
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    else
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    exception
    when others then
    if dbms_error_code=-20738 then
    clear_message;
    message('Error: absent or later record errror from the database trigger.);
    raise form_trigger_failure;
    elsif .....
    esle
    clear_message;
    message(error_code||' : '||error_text);message(' ',no_acknowledge);
    raise form_trigger_fialure;
    end if;
    end;any suggession?
    Regards

    i must come with a plsql code which handle every error and suppress unnecessary messages.Good luck with that. No matter how well thought out or planned, you're not going to be able to take all scenarios into account. The design of an exception handler takes time to address all possible scenarios you want handled and even then, you're not likely to handle every situation in the beginning.
    could we implement the oracle ebusiness error handling procedures here in our application?if yes, then where could we find that procedure?>
    I've dug through that code and it is not a thorough as you think it is. It handles specific situations and then defaults the rest. It is a good model for your own exception handler, however. That is what I used it for. :) I don't recall which library it is in, but I'll look around and if I find it, I'll post it.
    I agree with Andreas's comment...
    Simply remove your ON-ERROR-trigger, then you have a default. That's nothing better or worse than what apex has.I'm not too familiar with Apex; I've worked with it, but it's been a little while. Even with Apex, you're going to have to develop a customized Exception Handler so more intuitive or application specific messages are displayed in response to an exception.
    As to Andreas's comment...
    For your own error-handling... The "simplest" way in my eyes is create your own error-table where you have appropiate columns for the error-code and the error-type (FRM,ORA,Whatever), then in your ON-ERROR-trigger read the appropiate record from that table and show the error. You could also have a flag in your table which decides what to do with a specific error (Show as Message, Show as Alert, Don't show at all) and react accordingly.This is exactly what we implemented in our application. We created a set of tables that contain all of the Oracle Runtime errors and their attributes (Error Type, Severity Level, etc). Then we wrote a standard On-Error trigger that is subclassed to all of our forms that calls a Library "On_Error" package. This package evaluates the exception raised, compares it to the database entry for the error and then displays an appropriate message depending on the Severity Level, Error Type (ORA or FRM) and Message Type (Informational, Error, Caution) and we display the message in either the Status Bar, Note Alert, Caution Alert or Stop Alert or it is supressed. If an error is not found in the table, then it is displayed in a Stop Alert as an "Unhandled Exception." The second table I mentioned contains all of the messages used by our application and is cross referenced with the table that contains the Oracle messages. By simply assigned one of our messages to an Oracle message - our package will display our message instead of the default Oracle Message. Yes, this took sometime to build and test and once implemented, we spent another couple of months perfecting it, but now it is pretty solid and we haven't had to modify it in over a year.
    While this level of complexity may be overkill for your application, it does offer the greatest flexibility in the long-run. Also, if your application must support multiple languages, having all of your messages in a table make internationalization extremely easy. :)
    The point of all this, is that no matter which system you use (Forms, Apex, or Java) you will still need to invest some time into designing an Excpeiton Handling method for your application and then implement it accross the application. This is not something you can develop in a short period of time and it will not be perfect in the beginning. However, in the long-run, you will be happy you spent the time up-front to build a flexible and robust Exception Handling system.
    Craig...

  • Error messages in Pl Sql developer are in those funny characters

    Hi,
    Can someone help me on how to change the erroe messages to english in Pl Sql developer? when I run a query in pl sql developer the error messages gives the error code and those characters.
    thanks.
    Edited by: 848824 on Mar 30, 2011 11:45 PM

    hi
    u can try something like this.
    EXCEPTION
       WHEN invalid_number OR STANDARD.INVALID_NUMBER THEN
          -- handle the error
    END;OR
    RAISE FORM_TRIGGER_FAILURE;hope this helps u....
    sarah

Maybe you are looking for

  • Airport Express - MacBook Pro connection dropping

    Since I have purchased a MacBook Pro I have problems with the Airport Express connection. Before I had a PowerBook G4 and I did not experienced any problems at all. The connection or signal strength drops within a few seconds from 3 lines to 0 (based

  • Applying TAX aganist total Invoice amount

    Hello ALL, We are trying to implement Oracle AR module for Taiwan. The lowest dollar amount use can poay in Taiwan is 1 taiwan dollar, there is no cents. But I oracle applications Ar is set up with 2 decimals and AR apply tax aganist each line, not a

  • Swing "Panes"

    Hello again world. I thought I was beginning to understand the various "panes" one can manipulate when designing a Swing GUI. For example, I understand that any Swing Container that has a root pane automatically has a layered pane which consists of t

  • Old .idx files no longer working

    Old .idx files (index files) that worked with Reader 9 no longer work with Reader XI.  Because of this, I have not upgraded beyond Reader 9, but I love the new XI. Is there any way of converting the old .idx file so that they will work in XI?  (is th

  • HP Scanner on C3180 all in one

    Hello I just recently upgraded to Leopard and it pick up my printer (HP Photosmart C3180) all in one and when I try to use the scanner it is not recognizing it.I downloaded the software for 10.5.1 from HP and it still is not working.Please help