Error Message for Integrity Constraint

Hi,
I have a table with called TMREF_MEDIATION_DATA_TREATMENT and one called TMREF_UOC_CRITERIA_MAPPING. There is a foreign key constraint and the TMREF_UOC_CRITERIA_MAPPING
table has the UID column from the other table in it. When I select delete form TMREF_MEDIATION_DATA_TREATMENT I get an error as expected:
ORA-02292: integrity constraint (MRS_DEV.TMREF_UOC_CRIT_TO_TREAT_FK2) violated - child record found
Error
Unable to process row of table TMREF_MEDIATION_DATA_TREATMENT.
OK
But is there any way that I can make this error more user friendly? I do not want it to delete if there is a child record - it must just warn the user.
Thanks.

You could use this method:
http://apex.oracle.com/pls/otn/f?p=31517:185
which is in the page process. However, you could also create a validation, which will fire before the process is run and check the same.
Entering an invalid number will violate the constraint (the column is a number column) and this will then call the exception INVALID_NUMBER. You may also declare the constraint exception using
child_record_not_found EXCEPTION;
PRAGMA EXCEPTION_INIT (child_record_not_found, -02292);
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
-------------------------------------------------------------------

Similar Messages

  • Custom Error Messages for Database Constraint Violations Problem

    Hi
    I have added a custom message bundle for the model project as explained in
    37.8.3 in the Fusion Developer's Guide - How to customize error messages for database constraint violations.
    http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadvgen.htm#BABEFGCI
    Constraint Name : SYS_C0018574
    And I have following CustomErrorMessages class
    public class DBCustomErrorMessages extends ListResourceBundle {
        private static final Object[][] sMessageStrings =
            new String[][] { { "SYS_C0018574",
                               "Existing Record Found" } };
        protected Object[][] getContents() {
            return sMessageStrings;
    }This works fine when I run application model and adding records to vialate the constraint. So it gives me following message
    (oracle.jbo.DMLConstraintException) Existing Record FoundBut when run ui project it does not fire.
    Still it gives the message
    ORA-00001: unique constraint (CCBS2.SYS_C0018574) violatedCould you please shed some light?
    Edited by: deshan on Mar 15, 2011 11:28 AM

    Please see the image.
    http://4.bp.blogspot.com/-Fna66p-W5Jw/TX7uSQqqBtI/AAAAAAAAAH0/D1APg6oAIxI/s1600/1.JPG
    Error in Application Module ORA-00001: unique constraint (CCBS2.SYS_C0018574) violated exception is different from ui project.
    Any hint?
    Thanks
    deshan
    Edited by: deshan on Mar 15, 2011 10:16 AM

  • ADF-BC:Customize Error Messages for Database Constraint Violations

    Hai all
    I have an apploication using JDEV 10.1.3.3 and ADF BC.
    In my applcation I'm overriding the default error messages on violation of constraints by using a custom message bundle .
    I did all the things specified in Oracle® ADF Developer's Guide
    Chapter 25.8 Customizing Business Components Error Messages .
    IT is working fine
    My problem is along with the userdefined custom messge in the bundle
    another default message is showing which is nothing meaningful to the
    end user.
    For Ex: for an Uniqiue constraint the following error message comes
    Error
    1 .The Usercode should be unique!!!
    2 .ORA-00001: unique constraint (MYDB.USERCODEUNIQUE) violated
    ORA-06512: at line 1
    The first line is defined by me.the second one is added automatically.
    I want to prevent showing the error no 2 for all DB constraint violations
    Is there any method to do it.I think I'm missing someting
    Please help me.This is very annoying to the end user.
    Thanks
    Ans

    Hi,
    guess you know about this
    http://download-uk.oracle.com/docs/html/B25947_01/bcadvgen008.htm#sthref2393
    So have a look here
    http://download-uk.oracle.com/docs/html/B25947_01/web_val008.htm
    The code for this is from SRDemo and allows you to suppress messages from JSF display
    Frank

  • CreateException: error message for unique constraint isn't very helpful

    When I create a CMP bean in a table containing a unique constraint, I receive the expected CreateException. However, the error message looks like:
    "Error creating EntityBean: ORA-00001: unique constraint (SID.SYS_C005934) violated"
    This message isn't particularly helpful, especially if there are, say, three unique constraints, and the only difference is the "SYS_CXXXXXX" number. There is no way to tell which number applies to which constraint, and this makes it difficult to give a "readable" error message to the end-user.
    Is there a way of either (a) Setting the error message to be thrown by a unique constraint violation or (b) A means of getting the column name that was the focus of the violation? Either of these would make it easier to map an "readable" error message to the exception.
    Much thanks,
    -Roger

    Hi Roger,
    How about trying to give meaningfull names while creating the table, so that when the exception is throw, it would be easy to find the column
    which generated the exception.
    something like,
    SQL>create table table1
    id number(10) constraint UNIQUE_TABLE1_ID unique
    Table created
    SQL> insert into table1 values(1);
    1 row created.
    SQL> insert into table1 values(1);
    insert into table1 values(1)
    ERROR at line 1:
    ORA-00001: unique constraint (SCOTT.UNIQUE_TABLE1_ID) violated
    Hope this helps
    Regards
    Elango.

  • JhsError Messages for Database constraint

    Hello JhaedStart Team
    I want to display mycustome entity alias name in place of entity name in Jhs Error messages for Database constraint , as you know we can customize this error message by replacing ConstraintName as a key in our registered customMessage Bundle (according to 25.8.3 sction of ADFdevelopers guide) .
    In order to do that I should disable JHS NLS generation for JHS because it's custome messages prevent my message to be display from my customMessage Bundle , So I have tried to delete constraint key (eg CASCADING_DELETE_VIOLATION) from GeneratorText.properties but I see that the CASCADING_DELETE_VIOLATION message still generated in my project JHS message bundle.
    Please help me to fix the problem

    JHeadstart also supports customizing database constraint messages, as explained in section 11.4 of the JHeadstart 10.1.3.2 Developer's Guide. So you don't need to use the technique of section 25.8.3 of the ADF Developer's Guide, you can customize the message directly in the JHeadstart resource bundle.
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Error logging for Integrated Planning

    Can I turn on error logging for Integrated Planning.  Users get errors and forget to screenshot it to me, so I have no way of finding out what their error was unless I get them to duplicate it.  It would be nice to look up a log of errors by user.  Do they have something like that in Integrated Planning?
    Thanks!

    Hi Dustin,
    Few comments :
    1. UPDATE TASK means that a new background task is create and the function is performed asyncronisly ,with that the user will not wait for the update of the DB to finish ,you can read in SAP help about CALL FUNCTION IN UPDATE
    2. Be aware that the table that you create will be extremely large in no time ,you will have to delete data on a regular basis
    3. The same concept of the thread can be applied to function module 'RRMS_MESSAGE_HANDLING' this function module is responsible of messaging in BEX 'some times IP related messages are invoked from it.
    Regards,
    Eitan.

  • [svn:fx-trunk] 11683: Clarifying error message for framework logging level.

    Revision: 11683
    Author:   [email protected]
    Date:     2009-11-11 20:33:57 -0800 (Wed, 11 Nov 2009)
    Log Message:
    Clarifying error message for framework logging level.
    QE notes: N/A
    Doc notes: N/A
    Bugs:
    SDK-23699 - Incorrect error thrown when you use the level LogEventLevel.ALL with ILogger.log()
    Reviewer: For Paul
    Tests run: Test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23699
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/framework/bundles/en_US/logging.properties

  • How to create a error message for Deleted batch while creating a PO

    Hi ,
    Can any body tell me how to create error message for a deleted batch while creating a PO in ME21n,
    when a PO is created for a deleted batch at GI &GR lebel it is showing  a error message,
    but i want to show a error message while doing the PO creation.
    Thanks,
    Sachhi

    in badi  me_process_po_cust u can  put this message
    METHOD if_ex_me_process_po_cust~check.

  • For weeks I have been viewing a doggy day care via their web cam.  This weekend I upgraded to Lion and have been unable to view the center since.  I get an error message for java webcam class not found.  All of my software is up to date--suggestions?

    For weeks I have been viewing a doggy day care center via their web cam.  This weekend I upgraded to Lion and have been unable to view the center.  I get an error message for Java plug-in 1.6.0_29 ....webcam class not found.  Any suggestions on how to fix this?

    Sorry, don't know what else to suggest unless there's a URL to the problem stream that someone here can try. Otherwise we can't test it to try and determine what might be wrong.
    BTW, make sure they're testing it with a Mac, not with a Windows system. If they test only with Windows, what they say is or is not working doesn't mean much.
    Regards.

  • How to prevent error message for material description in MDG material detail screen, when user click on check action

    Dear Experts,
    I have a requirement for making material description as non mandetory in change request view of mdg material screen.
    I have done that using field usage in get data method of feeder classes, but still message is displaying.
    This message 'Material description is mandatory is displaying with check action only, but not with save or submit after i anhance field property as not mandetory.
    How to prevent error message for material description in MDG material detail screen, when user click on check action.
    Thanks
    Sukumar

    Hello Sukumar
    In IMG activity "Configure Properties of Change Request Step", you can completely deactivate the reuse area checks (but will then loose all other checks of the backend business logic as well).
    You can also set the error severity of the checks from Error to Warning (per CR type, not per check).
    Or you provide a default value for the material description, e.g. by implementing the BAdI USMD_RULE_SERVICE.
    Regards, Ingo Bruß

  • How to give error message for the screen element text field when wrong i/p

    How to give error message for the screen element text field when wrong i/p
    when wrong input given
    eg. 
    I have a text box with SBOOK-CARRID
    so when user give wrong entry in text box i.e LG
    then I should give some error stating that the the input is invalid or not available ,
    now it showing the error of standard messages,
    i want manual message to be displayed when error comes.
    Thank you,
    Regards,
    Jagrut Bharatkumar Shukla

    Hi all,
    Thank you for your valuable reply,
    but the thing is that its a screen field,
    i.e text box not a selection screen
    i created in screen layout
    with name sbook-carrid
    now i want to get error message display if wrong i/p is given
    thank you.
    Regards,
    Jagrut bharatkumar Shukla,

  • Error Message For BISystemUser: User not authenticated

    We have migrated from DEV to PROD env.(11.1.1.1 -> 11.1.1.3). Along problems with bipublisher - there are some strange thingths: we successfully loging using weblogic account into AdminConsole и Enterprise Manager, but in Answers we get an error: invalid username or password.
    nqserver.log:
    ...[ERROR:1] [] [] ... [tid: 1090] Error Message For BISystemUser: User not authenticated.
    ...[ERROR:1] [] [] ... [tid: 1090] [nQSError: 43126] Authentication failed: invalid user/password.
    In oracle support we found such issue (Doc ID 1308389.1):
    OBIEE 11g Error: "Unable to Sign in. invalid username or password was entered" After Changing Repository, Deleting BISystem User, Adding it Back (Doc ID 1308389.1)
    Applies to: Business Intelligence Server Enterprise Edition - Version: 11.1.1.3.0 [1905] to 11.1.1.5.0 [1308] - Release: 11g to 11g
    Symptoms: In OBIEE 11.1.1.3.0 using default authenticator, it is not possible to log in to OBIEE after changing repository. To troubleshoot, BIsystemuser was removed from global roles and added back again.
    Getting error: Unable to Sign in. invalid username or password was entered
    Changes: Changed repository, deleted BISystemuser, added the user back
    Cause: Several changes e.g changing rpd, deleting bisystem user, adding the user back etc. occurred in the environment and caused log in to OBIEE to stop working
    Solution: After a lot of troubleshooting e.g re-starting system in the correct order, refreshing GUIDs, re-start OBIEE with default SampleAppLite.rpd and web catalog, the error persists. The system was uninstalled and re-installed to avoid further corruption and configuration problems in the new installation. This resolved the problem
    Does we have to 'reinstall or make a lot of troubleshooting e.g re-starting system ' to solve this error?
    It seem to be funny for PROD environment. How we cam resolve this problem?

    Are you saying you upgraded both dev and prod from 11.1.1.1 to 11.1.1.3 or that you migrated a dev 11.1.1.1 to a prod 11.1.1.3? What did you migrate?
    At a rough guess the BISystemUser password is different in dev and prod (created by system on install) and in your 'migration' you've moved the dev credential across to prod.
    If that's the case you need to change the bisystemuser password to something known and update the credential store password.
    Another possibility might just be that you need to regenerate the GUIDs:
    http://download.oracle.com/docs/cd/E21764_01/bi.1111/e10543/privileges.htm#BIESC721

  • Error message for Adobe AIR 2.0.3 while trying to run Dreamweaver CS5

    imac 2.66 Ghz, Intel Core i5, OS 10.6.4.
    Error message for Adobe AIR 2.0.3 while trying to run Dreamweaver CS5:
    Adobe Air
    the installation of this app is damaged. Try re-installing or contacting the publisher for assistance.
    Tried several times to uninstall and reinstall from fresh download to no avail.
    I'm finding the instructions in the trouble shooting area a tad esoteric.
    Will there be an update to the installer released soon?

    Hi,
    I'm assuming your having troubles installing the 2.0.3 runtime?  If so, can you please try the instructions in this post?
    Thanks,
    Chris

  • Error message for  Unable to connect (BIB-16633)

    Dear All
    I use Oracle Jdeveloper10g (win32), Oracle database10g or 9i (win32 ver). But Failure to connect to OLAP service.
    Can anyone give me what is the error message for BIB-16633.
    Would be really grateful if you could give me a solution as soon as possible.
    Thanks & Regards,
    Mr.Tsang. Hong Kong

    For database versions you need to have at least 9206 for 9i and 10.1.0.4 for 10g. This requires you to apply the 9206 patchset to 9i and the 10.1.0.4 patchset to the 10g base install.
    Please note there are a lot of steps invloved in the patching process and you must make sure you have completed all the steps before creating your OLAP schema. Most problems occur because the patching process is incomplete and the OLAP option is in an invalid state.
    You can check the state of the OLAP option using the following commands in SQLPlus:
    column comp_name format a35
    SELECT comp_name, status, substr(version,1,10) as version
    from dba_server_registry order by modified;
    Once the OLAP option is in a valid state, then you must ensure the OLAPSYS account is unlocked. To test the OLAP environment you can install the BI10G sample schema which will create a new user account called CS_OLAP which contains an Analytic Workspace.
    Hope this helps
    Business Intelligence Beans Product Management Team
    Oracle Corporation

  • Error Message for the cancellation of paid billing document

    Hi,
    Can i create and error message for the cancellation of paid billing document? If yes, how can i create such.
    Overview:
    Accounting document is created upon creation of billing document. Upon payment, document cleared is the accounting document created. There are instances wherein accounting document was already cleared but our user is still able to reversed billing document. Now, i want to create an error message or user exist wherein, when a user will not be able to reverse the billing document if the accounting document attached to this billing document is already paid.
    Thank you and best regards.
    Rachelle

    Hi Rachel,
    You can make use of the exit (Include) MV45AFZZ. The corresponding form routine is FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
    In this exit, For the given billing document ( which is going to be cancelled ), pick up the accouting document from BSEG tables.
    For this accouting document, Pass this to BSAD Table ( Customer clleared items) 
    If BSEG-BELNR = BSAD-BELNR and
      BSEG-Acc.Year = BSAD-Acc,year )..
    Then throw a error message and EXIT.
    So for all the cleared docments , user can not cancel the invoices.
    Regards,
    Sai

Maybe you are looking for

  • Read Azure AD in Visual Studio 2013

    I am working on a Room App, which is simply used to let user know if the room is free/busy and display all the custom attributes along with room capacity. While using online Exchange I came across that capacity and custom attributes are stored in Act

  • How to adjust Variant ?

    Hi, I had a report with more than 20 variants & was working fine. Now I have modified its selection-screen as per the requirement. But after this, all the varaints starts giving error like Variant 'XYZ' of program 'ABC'  is not the current version. T

  • Recovering Lost Apps from an iPad2

    I have recently updated the software on my iPad 2 and in doing so have lost all of my apps. How do I get them back?

  • Problems traveling in Eurpe

    I just arrived in Italy and the wifi in the hotel works fine for Safari but Mail can't "connect to server." This is true for both my mac.com account and my sbcglobal.net (yahoo) account. Same issue on my iPhone. To make matters worse, I can't seem to

  • Can I use icloud on my iPhone 1

    I've been forced to migrate to icloud but can't get emails on my iPhone 1 - any fix for this?