Re: SQL*Forms 3 Question

From: Swapan Jha <jhas_at_ix.netcom.com>
Date: 1995/08/08
Message-ID: <407ogg$kjl_at_ixnews2.ix.netcom.com>#1/1


In <3vo2g2$t8a_at_senator-bedfellow.MIT.EDU> sturner_at_athena.mit.edu (Stephen Turner) writes:
>
>Here's one for forms 3 gurus - if a user tries to commit something
>which generates an oracle error (e.g. inserting a duplicate index
 value
>or trying to insert with a null value in a mandatory field) is there
>any way to have the form know exactly what the error is?
>
>Such errors (on an insert) generate a forms error 40508 which is a
>generic error - is there any way to find out more specific error
>information. It would be nice to be able to display a more meaningful
>error message and not make the user have to press Display Error to
>see what the problem is.
>
>Steve Turner

Try using ON-ERROR trigger, you can retrieve the error message using form variables ERROR_CODE, ERROR_TEXT, ERROR_TYPE. (refer Forms 3.0 documentation for more details)

i.e. message(TO_CHAR(ERROR_CODE));

Swapan Jha Received on Tue Aug 08 1995 - 00:00:00 CEST

Original text of this message