Subject | Re: [firebird-support] Stop the deleting process |
---|---|
Author | Lucas Franzen |
Post date | 2003-09-23T17:01:27Z |
Marc,
Marc Geldon schrieb:
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.
Marc Geldon schrieb:
> Hello!Yes, you can raise an exception.
>
> Is it possible to stop the deleting process in a BEFORE DELETE trigger? I mean: Can I prevent IB/FB from delete a row?
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.