Subject | Re: [ib-support] BEFORE DELETE TRIGGER |
---|---|
Author | Nando Dessena |
Post date | 2002-02-21T08:16:48Z |
abizafu,
operation and relinquish control to the caller. eventually, control will
reach the client application (unless the exception gets trapped along
the way, f.ex. by a stored procedure which deleted the records causing
the trigger to fire).
Have a look at create exception and exception in your documentation;
it's as simple as
create exception cant_do_it 'You can''t do it';
create trigger ...
as
begin
if not (<can you do it?>) then
exception cant_do_it;
end
HTH
--
____
_/\/ando
> Is it possible to abort the transaction and return to calling programnot exactly. You may raise an exception which will abort the current
> (i.e. Builder,Delphi,etc...) from a Before Delete Trigger.
operation and relinquish control to the caller. eventually, control will
reach the client application (unless the exception gets trapped along
the way, f.ex. by a stored procedure which deleted the records causing
the trigger to fire).
Have a look at create exception and exception in your documentation;
it's as simple as
create exception cant_do_it 'You can''t do it';
create trigger ...
as
begin
if not (<can you do it?>) then
exception cant_do_it;
end
HTH
--
____
_/\/ando