Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AB0439FA65C for ; Thu, 5 Oct 2006 07:54:37 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 95856-09 for ; Thu, 5 Oct 2006 10:54:32 +0000 (UTC) X-Greylist: delayed 00:06:40.260608 by SQLgrey- Received: from smtp-bal.opennet.it (smtp1.opennet.it [212.110.32.48]) by postgresql.org (Postfix) with ESMTP id 1BB659FA5DC for ; Thu, 5 Oct 2006 07:54:31 -0300 (ADT) Received: (qmail 17845 invoked by uid 0); 5 Oct 2006 10:47:48 -0000 Received: from unknown (HELO comai04) (212.110.56.36) by smtp-bal.opennet.it with SMTP; 5 Oct 2006 10:47:48 -0000 Message-ID: <03ab01c6e86c$150f6400$0501a8c0@comai04> From: "Stefano B." To: Subject: CachedRowSetImpl: transaction isolation level error Date: Thu, 5 Oct 2006 12:50:33 +0200 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_03A8_01C6E87C.D8876B20" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.136 tagged_above=0 required=5 tests=FORGED_RCVD_HELO, HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200610/40 X-Sequence-Number: 15923 This is a multi-part message in MIME format. ------=_NextPart_000_03A8_01C6E87C.D8876B20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 =3D new CachedRowSetImpl(); ConnectionManager.openConnection(...); ConnectionManager.executeQuery( "select ..." ) ResultSet myResultset =3D 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 =3D 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=3D62629 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 ------=_NextPart_000_03A8_01C6E87C.D8876B20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi, I'm trying to use CachedRowSet in = my JTable=20 TableModel.
I execute the query, I obtain a = resultet, anf after=20 I try to update the fields.
 
The first time that I try to save my = data I obtain=20 no error, OK
 
If I save the data another time I get = the following=20 error:
 
"Cannot change transaction isolation = level in the=20 middle of a transaction"
 
My code:
CachedRowSetImpl crs =3D new=20 CachedRowSetImpl();
 
ConnectionManager.openConnection(...);
ConnectionManager.executeQuery( "select = ..."=20 )
ResultSet myResultset =3D=20 ConnectionManager.getResultSet();
 
crs.setTableName("MyTable");
crs.populate(MyResultSet);
 
ConnectionManager.closeConnection(); = //Here I close=20 my database connection
 
//updates
...
crs.absolute(...);
crs.updadeDate( column, myDate = );
 
....
//
 
Connection conn =3D=20 ConnectionManager.getConnection();
 
crs.acceptChanges(conn); //THE ERROR IS = HERE (the=20 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=3D62629
 
but I didn't find any = solutions
 
Thanks in advance
Stefano
 
PS. I use the Postgresql JDBC 8.1 = driver but also=20 the 8.2 has the same problem
 
 
------=_NextPart_000_03A8_01C6E87C.D8876B20--