Subject Re: [firebird-support] Stop the deleting process
Author Daniel Berstein
Will such an exception be raised for every row to be deleted or will the first raised
exception abort the whole operation?

Regards,
Daniel Berstein.

On 23 Sep 2003 at 19:01, Lucas Franzen wrote:

> Marc,
>
> Marc Geldon schrieb:
>
> > Hello!
> >
> > Is it possible to stop the deleting process in a BEFORE DELETE trigger? I mean: Can I prevent IB/FB from delete a row?
>
> Yes, you can raise an exception.
>
> create exception E_NO_DELETE 'This record cannot be deleted';
>
> create trigger bd_mytable
> for mytable before delete
> position 0
> as
> begin
> if ( condition for no dleetion is given ) then
> begin
> exception E_NO_DELETE;
> end
> end
>
> HTH
>
> Luc.
>
>
>
>
> To unsubscribe from this group, send an email to:
> firebird-support-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>