Re: Multiple open ResultSets not allowed?

From: "Tim Lucia" <Tim(dot)Lucia(at)storigen(dot)com>
To: "Barry Lind" <blind(at)xythos(dot)com>, "Jeff Kolesky" <jeff(at)edusoft(dot)com>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Multiple open ResultSets not allowed?
Date: 2003-03-17 16:51:17
Message-ID: 7BFCE5F1EF28D64198522688F5449D5A01BEB2E7@xchangeserver2.storigen.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

It definitely was. Applications I had which worked with nested result
sets using the pre-7.3 driver needed to be cleaned up to be
spec-compliant once the driver was made so.

Tim Lucia

-----Original Message-----
From: Barry Lind [mailto:blind(at)xythos(dot)com]
Sent: Friday, March 14, 2003 10:56 PM
To: Jeff Kolesky
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: [JDBC] Multiple open ResultSets not allowed?

The error message says that the Connection is closed. You can't use a
statement or result set after the connection that owns them is closed.
This is part of the jdbc spec, and I think logic in the driver was
tightened up in this area in 7.3.

thanks,
--Barry

Jeff Kolesky wrote:
> I have just switched to using the 7.3 JDBC driver and am no longer
> allowed to have multiple ResultSets open at the same time.
>
> When running code that iterates through two open ResultSets (from two
> different Statements from the same Connection), the following
exception
> is thrown:
>
> Connection is closed. Operation is not permitted.
> at org.postgresql.jdbc1.AbstractJdbc1ResultSet.next
> (AbstractJdbc1ResultSet.java:92)
>
> I haven't looked at the AbstractJdbc1ResultSet code to see what is
going
> on, but according to the JDBC Javadocs, "if the reading of one
ResultSet
> object is interleaved with the reading of another, each must have been

> generated by different Statement objects." Therefore, the code I am
> executing should not throw this exception, and with the previous
version
> of the driver it did not.
>
> Is this a known bug? Has it been fixed? Did I misinterpret the
Javadocs?
>
> Thanks.
>
> Jeff
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jeff Kolesky 2003-03-17 17:01:48 Re: Multiple open ResultSets not allowed?
Previous Message Csaba Nagy 2003-03-17 16:37:22 Re: OpenOffice and Postgres 7.3.2