Hi,
How can i capture error either it can be raise due to primary/Foreign key or due to database trigger,
Is there any way to display proper message which can be more user friendly in order to understand the issue.
Thanks.
❇️ OrclQA.Com is a question and answer forum for programmers.
❇️ Here anyone can ask questions and anyone can answer to help others.
❇️ It hardly takes a minute to sign up and it is 100% FREE.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
OrclQA.Com is a question and answer forum for programmers.
Here anyone can ask questions and anyone can answer to help others.
It hardly takes a minute to sign up and it is 100% FREE.
goto150
Try validations.
Hussain
Hi,
I have create function based on this" https://www.foxinfotech.in/2020/03/oracle-apex-error-handling-function-example.html" and called at page level, but still there is no proper error appearing which can be more readable.
Please suggest.
Thanks.
goto150
It would be easier if you were more specific about the case you're dealing with.
Hussain
Unique constrain or primary key or any other error message should be displayed as per mapping which has been defined in custom table.
goto150
I was rather thinking of something like...
I have a page item called P10_Serial_Number of Text type and I let user to edit it. My table Products, I insert P10_Serial_Number to, accepts only unique values for the SN field... Is there a way to customize an error message in case unique constraint is breached? I tried solution proposed in Foxinfo... but instead of getting what author described as custom error, I get this and that...
What I am trying to say is that you have your "use case" in front of you, so why not put it here?
Hussain
Hi,
Create two form Dept and Emp, both have primary and reference key. However, try to delete dept which deptno exist in emp then you will be getting constrain error, this error i want to be displayed as per my message.
goto150
Hi Hussain,
I have this simple FORM on page 61 with DELETE button triggering Delete process:
:P61_DEPT_DEPTNO is page item labeled Dept Deptno here in the screen and you may see that while trying to fire Delete process I get standard error.
Here is the place where validation comes on the stage. In Proccessing section of the page I click Validation and Create Validation:
So now instead of standard error you'll see the one you just created.
goto150
... But if you really want to go with custom error handling function, it is enough if you copy Example of an Error Handling Function from Oracle Doc here : Documentation and use it as described in one in your earlier post in this theread. In Oracle doc it's explain in details how to adjust it and where so that it will serve your need.
When I used it basicaly as it is, with only 1 small adjustment for I was not patient enough to create my own CUSTOM error table:
I get this when violating FK:
I guess it is worth to try each those 2 and use the one that best fits your needs