Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger - Close but no cigar?

Re: Trigger - Close but no cigar?

From: <david.archer_at_chase.com>
Date: Thu, 19 Aug 1999 15:05:53 GMT
Message-ID: <7ph6g7$vh5$1@nnrp1.deja.com>


This seems to be working as advertised. What are you expecting to happen? The only problem I see here is you've defined your error number , in you raise_application_error statment as being -12345. In Oracle user defined exceptions should use the range -20000 to -20999.

David Archer

In article <0221c012.ad1722ba_at_usw-ex0106-048.remarq.com>,   abrusko <abruskoNOfiSPAM_at_binney-smith.com> wrote:
> Hi,
>
> I'm trying to create a security trigger that will secure
> one column in a table from any updates or deletions. I
> think it's close, but it's still coming up with an error
> message that I can't resolve.
>
> This trigger is:
> create or replace trigger secure_freight_columns
> before delete or update of remit on frt.freight
> declare
> cannot_change EXCEPTION;
> begin
> raise cannot_change;
> EXCEPTION
> WHEN cannot_change then
> raise_application_error(-12345,'May not CHANGE or DELETE
> the REMIT column');
> end;
>
> The Errors that occur at run time when I change the "remit"
> column are:
>
> ORA-20324: May not CHANGE or DELETE the REMIT column
> ORA-06512: at "ZP29.SECURE_FREIGHT_COLUMNS", line 7
> ORA-04088: error during execution of trigger
> 'ZP29.SECURE_FREIGHT_COLUMNS'
>
> Can anyone please tell me what to do to get over the hump
> with this one...appreciate it greatly!
>
> Andy
>
> * Sent from RemarQ http://www.remarq.com The Internet's Discussion
Network *
> The fastest and easiest way to search and participate in Usenet -
Free!
>
>

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Aug 19 1999 - 10:05:53 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US