Subject Re: [IBO] After a fail transaction
Author Helen Borrie
At 02:04 PM 12/06/2004 +0800, you wrote:
>Just want to know if there are things to do after committing a
>transaction which result to a failure due to some exception raise.

Sure are!

If COMMIT is called and returns an exception, the transaction isn't
finished. There are only two ways to finish a transaction: commit it, or
roll it back. So the application has to be prepared to finish the
transaction, one way or the other. Now, whether we resolve the situation
by fixing the problem and resubmitting our request, or by rolling back the
transaction, depends on what sort of exception it is.

For finding out what sort of exception it is, Firebird has hundreds of
exception codes that your application can look out for. Naturally, you
won't be looking for all of them: only the few that your could fix up
using code. The rest you would want to roll back, cancel and ask the user
to have another go.

IBO has some very fancy stuff for detecting exceptions.

You can download a doc containing the full set for Firebird 1.5 errorcodes
from the Contributed Code area of the IBO website.

Also pick up the TI sheet on exception handling from the TechInfo page.