On Thu, 24 Mar 2005, David Gagnon wrote:
> I'm already able to get Refcursor from a stored procedure. But now I > need to get a SETOF refcursor and I can't make it work... Is that > possible to do this via JDBC? > > He is the code I did. The rsTmp.next() throws a Connection is > closed. Operation is not permitted. Exception. > > > rs = new ResultSet[j]; > System.arraycopy(tempArray, 0, rs, 0, j); > rsTmp.close(); System.arraycopy does not make a deep copy, so the rsTmp.close() closes the ResultSet. You really can't copy resources around like that. Consider how you would copy a Connection object. Does that establish a new connection? The underlying tcp/ip connection can't be copied. Kris Jurka ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq