Обсуждение: CachedRowSetImpl: transaction isolation level error

Поиск
Список
Период
Сортировка

CachedRowSetImpl: transaction isolation level error

От
"Stefano B."
Дата:
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