CachedRowSetImpl: transaction isolation level error - Mailing list pgsql-jdbc

From Stefano B.
Subject CachedRowSetImpl: transaction isolation level error
Date
Msg-id 03ab01c6e86c$150f6400$0501a8c0@comai04
Whole thread Raw
List pgsql-jdbc
Hi, I'm trying to use CachedRowSet in my JTable TableModel.
I execute the query, I obtain a resultet, anf after I try to update the fields.
 
The first time that I try to save my data I obtain no error, OK
 
If I save the data another time I get the following error:
 
"Cannot change transaction isolation level in the middle of a transaction"
 
My code:
CachedRowSetImpl crs = new CachedRowSetImpl();
 
ConnectionManager.openConnection(...);
ConnectionManager.executeQuery( "select ..." )
ResultSet myResultset = ConnectionManager.getResultSet();
 
crs.setTableName("MyTable");
crs.populate(MyResultSet);
 
ConnectionManager.closeConnection(); //Here I close my database connection
 
//updates
...
crs.absolute(...);
crs.updadeDate( column, myDate );
 
....
//
 
Connection conn = ConnectionManager.getConnection();
 
crs.acceptChanges(conn); //THE ERROR IS HERE (the first time, ok, the second I get the error)
 
crs.release();
crs.close();
...
...
 
 
I have take a look at:
 
but I didn't find any solutions
 
Thanks in advance
Stefano
 
PS. I use the Postgresql JDBC 8.1 driver but also the 8.2 has the same problem
 
 

pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: Autogenerated keys and ... RETURNING
Next
From: Michael Paesold
Date:
Subject: Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails