Forum Stats

  • 3,780,542 Users
  • 2,254,408 Discussions
  • 7,879,376 Comments

Discussions

How to handle FRM-40508 error

1049879
1049879 Member Posts: 39
edited Feb 20, 2015 9:02AM in Forms

Hello guys,

I am trying to display a message when this error occurs. I used the following code in my save button , it didn't work.

I am using Developer 6i

declare

errcode NUMBER := ERROR_CODE;

dbmserrcode NUMBER;

dbmserrtext VARCHAR2(200);

begin

IF errcode = -40508 THEN

Message('Your number is too large. Try again.'); message(' ');

end if ;

I used the positive value  of the number, it also didn't work. How do I show a message ?

I also get an error if I want to use the form builder help and it opens the windows help

Do you have any idea how to solve such a problem?

Tagged:

Best Answer

  • HamidHelal
    HamidHelal Member Posts: 3,524 Gold Trophy
    edited Feb 20, 2015 9:02AM Accepted Answer

    In your save don't include the above code

    At FORM Level ON-ERROR trigger write the following code

    IF ERROR_CODE='40508' OR ERROR_CODE='40509' THEN
    
    Message('Your number is too large. Try again.');
    message(' ');
    
        raise form_trigger_failure;
    end if;
    

    Hope this works..

    Hamid

Answers

This discussion has been closed.