Subject | Re: [IBO] After a fail transaction |
---|---|
Author | James |
Post date | 2004-06-12T08:08:31Z |
Hi,
Helen Borrie wrote:
exception raise is the exceptions I create in my Database. So under such
kind of exception does the transaction finish or not? If yes then I
don't have to do anything right? and If No either I rollback or try to
fix the problem.
james
Helen Borrie wrote:
> Sure are!Thank you Helen. Iam sorry I didn't mention clearly that what I mean by
>
> 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.
>
> cheers,
> Helen
>
exception raise is the exceptions I create in my Database. So under such
kind of exception does the transaction finish or not? If yes then I
don't have to do anything right? and If No either I rollback or try to
fix the problem.
james