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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Delete trigger

Re: Delete trigger

From: Yann Cauchard <yann.cauchard_at_spcconsultants.com>
Date: 2000/07/13
Message-ID: <8kjpka$15vk$1@news4.isdnet.net>#1/1

The 1 solution make nothing : it means the deletion is effective... The second solution raises 3 messages :

ERREUR à la ligne 1:

ORA-20000: No delete please
ORA-06512: à "LIMSSUPER.NODELETEO2", ligne 2
ORA-04088: erreur lors d'exécution du déclencheur 'LIMSSUPER.NODELETEO2'

I'd like to avoid the 2 last messages. How to do ?

Thanks

Yong a écrit dans le message <8kib2e$mlc$1_at_news.sinet.slb.com>...
>Maybe I misunderstand. But could you simply
>
>(1) put null;
>
>(2) or put raise_application_error(-20002,'');
>
>in the trigger body?
>
>Yong Huang
>
>Mark D Powell <mark.powellNOmaSPAM_at_eds.com.invalid> wrote in message
>news:0236ff0d.199f06d4_at_usw-ex0102-015.remarq.com...
>> "Yann Cauchard" <yann.cauchard_at_spcconsultants.com> wrote:
>> >Hello,
>> >
>> >I have to avoid deleting lines in a table using a trigger.
>> >I started to write a before delete trigger, which returns some
 error
>> >messages.
>> >But i'd like to return no messages, or a custom message.
>> >Can someone help ?
>> >
>> >Thanks in advance.
>> >
>> >Yann CAUCHARD
>> >
>> The only way I can think of to stop the delete would be to
>> raise_application_error(-20002,'Deletes are not allowed'). This
>> will allow you to send a message, but I do not know any way to
>> send no message, but depending on the front-end applicaion you
>> should be able to control what the user sees.
>>
>>
>>
>>
>>
>> -----------------------------------------------------------
>>
>> Got questions? Get answers over the phone at Keen.com.
>> Up to 100 minutes free!
>> http://www.keen.com
>>
>
>
Received on Thu Jul 13 2000 - 00:00:00 CDT

Original text of this message

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