CachedRowSetImpl: transaction isolation level error

From: "Stefano B(dot)" <stefano(dot)bonnin(at)comai(dot)to>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: CachedRowSetImpl: transaction isolation level error
Date: 2006-10-05 10:50:33
Message-ID: 03ab01c6e86c$150f6400$0501a8c0@comai04
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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:
http://swforum.sun.com/jive/thread.jspa?threadID=62629

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

Browse pgsql-jdbc by date

  From Date Subject
Next Message Michael Paesold 2006-10-06 07:40:15 Re: [pgsql-jdbc] dollar-quoted CREATE FUNCTION statement fails
Previous Message Dave Cramer 2006-10-04 12:23:12 Re: Autogenerated keys and ... RETURNING