Subject Re: [firebird-support] Cancel transaction
Author Thomas Steinmaurer
> 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/