Subject Re: [Firebird-Architect] Autonomous Transaction Routines
Author Alex Peshkov
On Friday 02 November 2007 19:11, Adriano dos Santos Fernandes wrote:
> Leyne, Sean escreveu:
> > But in these cases; wouldn't the user want to know/log whether the
> > operation was successful (was committed or rolled back)?
>
> A committed status/record could be written in the normal transaction.
>
> The ones without this was rolled back.

There are other ways. For example, one can have WHEN handler, in which using
autonomous transaction log it, and after it use EXCEPTION to throw an error
and rollback main request.

And may I suggest slightly other syntax. We never write
BEGIN FOR SELECT ...
END FOR SELECT
May be for autonomous transaction a bit more traditionally-looking syntax can
be used, i.e.:
IN AUTONOMOUS TRANSACTION DO {complex_statement}