Re: "nested transaction" - encosing statement gets closed

From: Kris Jurka <books(at)ejurka(dot)com>
To: Havard Tveite <havard(dot)tveite(at)umb(dot)no>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: "nested transaction" - encosing statement gets closed
Date: 2007-01-15 17:30:36
Message-ID: Pine.BSO.4.64.0701151227070.12242@leary2.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Mon, 15 Jan 2007, Havard Tveite wrote:

> I have experienced problems using the JDBC type 2 and type 3
> drivers for 8.1 (postgresql-8.1-408.jdbc3.jar,
> postgresql-8.1-408.jdbc2.jar) against PostgreSQL 8.1.5.
>

Are you sure it's complaining that stmt is closed. This coding clearly
looks like the problem will be with stmtchk as you close it in the loop,
but then continue using it.

> Statement stmtchk = conn.createStatement();
> while (rs.next()) {
> ResultSet rsch = stmtchk.executeQuery(checkquery);
> stmtchk.close(); // leads to the closing of stmt!!!
> }
>

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jeanna Geier 2007-01-15 17:55:32 Re: Problem Retrieving/Refresing Data From Database
Previous Message Jeanna Geier 2007-01-15 16:36:27 Problem Retrieving/Refresing Data From Database