From: Stefano B. <stefano.bonnin@comai.to>
To: pgsql-jdbc@postgresql.org
Subject: CachedRowSetImpl: transaction isolation level error
Date: Thu, 5 Oct 2006 12:50:33 +0200
Message-ID: <03ab01c6e86c$150f6400$0501a8c0@comai04> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: stefano.bonnin@comai.to
Subject: Re: CachedRowSetImpl: transaction isolation level error
In-Reply-To: <03ab01c6e86c$150f6400$0501a8c0@comai04>
References: <03ab01c6e86c$150f6400$0501a8c0@comai04>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox