Subject | Re: [firebird-support] Re: Rollback event on trigger |
---|---|
Author | Helen Borrie |
Post date | 2005-01-24T07:44:16Z |
At 01:51 AM 24/01/2005 +0000, you wrote:
back (or committed) ONLY by the client application.
When an exception is returned to the client (in contrast to being caught
and handled in the trigger or stored procedure) the entire work of the
transaction is in an active but uncommitted state.
All work happens inside a transaction and transactions are atomic, that is,
a successful commit commits all of the work done since the transaction
began; a failed commit that is subsequently rolled back by the client in
response to a commit failure "undoes" all work done since the transaction
started.
./heLen
>No, the best way is to raise a custom exception. In your applicationNo, an exception does not roll back your work. A transaction can be rolled
>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).
back (or committed) ONLY by the client application.
When an exception is returned to the client (in contrast to being caught
and handled in the trigger or stored procedure) the entire work of the
transaction is in an active but uncommitted state.
All work happens inside a transaction and transactions are atomic, that is,
a successful commit commits all of the work done since the transaction
began; a failed commit that is subsequently rolled back by the client in
response to a commit failure "undoes" all work done since the transaction
started.
./heLen