Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: trigger
A copy of this was sent to daud11_at_hotmail.com
(if that email address didn't require changing)
On Wed, 18 Aug 1999 10:51:37 GMT, you wrote:
>Hi All
>
>I would like to create a trigger to do some checking before inserting a
>record. On finding an error I would like to raise an error and prevent
>the record from being saved.
>Question: when I raise the error using
>raise_application_error(<number>, 'Message'), what's the number that I
>can use/what's the range of valid number that I can use?
>
>Thanks
>
>
>Sent via Deja.com http://www.deja.com/
>Share what you know. Learn what you don't.
straight from the plsql manual:
To call raise_application_error, you use the syntax
raise_application_error(error_number, message[, {TRUE | FALSE}]);
where error_number is a negative integer in the range –20000 .. –20999 and message is a character string up to 2048 bytes long. If the optional third parameter is TRUE, the error is placed on the stack of previous errors. If the parameter is FALSE (the default), the error replaces all previous errors. Package DBMS_STANDARD is an extension of package STANDARD, so you need not qualify references to it.
--
See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'...
Current article is "Part I of V, Autonomous Transactions" updated June 21'st
Thomas Kyte tkyte_at_us.oracle.com Oracle Service Industries Reston, VA USA
Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Aug 18 1999 - 07:09:25 CDT
![]() |
![]() |