Re: [JDBC] plpgsql function with RETURNS SETOF refcursor AS. How
| От | Kris Jurka |
|---|---|
| Тема | Re: [JDBC] plpgsql function with RETURNS SETOF refcursor AS. How |
| Дата | |
| Msg-id | Pine.BSO.4.56.0503241840570.31387@leary.csoft.net обсуждение исходный текст |
| Ответ на | plpgsql function with RETURNS SETOF refcursor AS. How to get it work via JDBC (David Gagnon <dgagnon@siunik.com>) |
| Ответы |
Re: [JDBC] plpgsql function with RETURNS SETOF refcursor AS. How to
|
| Список | pgsql-general |
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
В списке pgsql-general по дате отправления: