Subject | Re: Rollback event on trigger |
---|---|
Author | Adam |
Post date | 2005-01-24T01:51:35Z |
No, the best way is to raise a custom exception. In your application
catch that exception and react appropriately (which may include not
displaying anything to the end user). Just because Firebird raises an
exception, doesn't mean they need to get an error message on their
screen. They will only get the error if you do not handle the
exception.
But if you raise an exception, your work is rolled back (which is
what you want).
Adam
--- In firebird-support@yahoogroups.com, Adomas Urbanavicius
<adomas@i...> wrote:
catch that exception and react appropriately (which may include not
displaying anything to the end user). Just because Firebird raises an
exception, doesn't mean they need to get an error message on their
screen. They will only get the error if you do not handle the
exception.
But if you raise an exception, your work is rolled back (which is
what you want).
Adam
--- In firebird-support@yahoogroups.com, Adomas Urbanavicius
<adomas@i...> wrote:
> Hi,trigger
> Is it possiple somehow to rollback edit/delete/insert event on
> automatically ?can
> I can raise ecxeption, but what if I want to do it silently.
> Something like
> table tb_cutomers
>
> trigger on delete
> ..... test if customer has some not returned loans ..... then
> rollback/cancel
> else delete it.
>
> It is possible to do so in App, but some "clever" customers admins
> access raw table via console and write "delete fromtb_customers...." :))
> Same with edition or insertion.
>
>
>
>
> Adomas