Subject Re: [Firebird-Java] Re: auto commit mode
Author Doug Chamberlin
At 6/9/2003 11:09 AM (Monday), Roman Rokytskyy wrote:
> > So the general question could be: what happens after a SQL error
> > 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.

Just for my own edification, when auto commit is on, when the driver
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?