Subject | Re: [Firebird-Java] Re: auto commit mode |
---|---|
Author | Doug Chamberlin |
Post date | 2003-06-09T15:35:16Z |
At 6/9/2003 11:09 AM (Monday), Roman Rokytskyy wrote:
detects that the statement failed and then requests a rollback, how does
the caller get notified that the statement (and transaction) failed? Does
the driver then raise its own exception?
> > So the general question could be: what happens after a SQL errorJust for my own edification, when auto commit is on, when the driver
> > occurs and autocommit mode is switched on?
>
>In general it is quite interesting question... Transaction should be
>rolled back. Driver is relatively simple here. It tries to commit
>transaction, if commit fails, it performes rollback (probably we can
>simply rollback tx in auto-commit case). So, it is the responsibility
>of the database server to _not allow_ transaction to be committed. I
>am almost 100% sure that in scenario described above transaction will
>be rolled back.
detects that the statement failed and then requests a rollback, how does
the caller get notified that the statement (and transaction) failed? Does
the driver then raise its own exception?