Subject Re: [Firebird-Java] Commit fails if nothing has been done since last commit
Author David Jencks
I think I fixed this. I assume you previously set autocommit false before
the code you show us? It stays false until you set it true.

When you check out from cvs, be sure you do not have
FBPreparedStatementWithFields and FBResultSetWithFields -- these classes
are no longer present.

david jencks


On 2002.03.19 11:32:01 -0500 Erik Erskine wrote:
> I'm getting the following error if I try and commit a transaction when
> nothing has been done since the last commit/rollback.
>
> The code looks like this:
>
> // sql operations
> con.commit(); // works fine
> con.setAutoCommit(false);
> con.commit(); // fails
> con.setAutoCommit(false);
>
> The exception is:
>
> java.sql.SQLException: javax.resource.ResourceException: couldn't commit
> local transaction: javax.transaction.xa.XAException
> at org.firebirdsql.jdbc.FBConnection.commit(FBConnection.java:358)
>
> What I have done works fine with Interclient, is this valid SQL? If
> not, is there an easy way to test whether a commit/rollback is necessary?
>
> thanks,
>
> Erik
>
> /--------------------------------------------------------------------\
> | Erik Erskine erik@... |
> | Sundayta Ltd |
> \--------------------------------------------------------------------/
>
>
>
> To unsubscribe from this group, send an email to:
> Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>
>