Subject Re: [firebird-support] Cancel transaction
Author Ismael L. Donis García
1 million thanks, I realize that I solve it with an exception.
=========
¦¦ ISMAEL ¦¦
=========

----- Original Message -----
From: Thomas Steinmaurer
To: firebird-support@yahoogroups.com
Sent: Wednesday, February 10, 2010 2:21 PM
Subject: Re: [firebird-support] Cancel transaction



> As I could cancel a transaction inside a triggers?
>
> I want something like:
>
> if (new.IDE > 10) then
> TRANSACTION ROLLBACK;

You can throw a user-defined exception with:

EXCEPTION <your_exception>;

instead of

TRANSACTION ROLLBACK;

Throwing an exception will rollback the entire client transaction
though. Firebird 2.5 will have autonomous transactions in PSQL, which
allows you to rollback/commit some kind of nested transactions in PSQL
without interfering with the client transaction.

HTH.

--
Best Regards,
Thomas Steinmaurer
LogManager Series - Logging/Auditing Suites supporting
InterBase, Firebird, Advantage Database, MS SQL Server and
NexusDB V2
Upscene Productions
http://www.upscene.com
My blog:
http://blog.upscene.com/thomas/




[Non-text portions of this message have been removed]