Re: Newby Question - accessing refcursor.

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: Newby Question - accessing refcursor.
Дата
Msg-id Pine.BSO.4.64.0809251929100.30128@leary.csoft.net
обсуждение исходный текст
Ответ на Newby Question - accessing refcursor.  (burferd <jarzabek@pobox.com>)
Ответы Re: Newby Question - accessing refcursor.  (burferd <jarzabek@pobox.com>)
Список pgsql-jdbc

On Thu, 25 Sep 2008, burferd wrote:

> I'm trying to fetch the data returned from the stored procedure with the
> method listed below.
> When I do, the execute() method throws the following exception:
> ERROR: cursor "<unnamed portal 1>" does not exist

To cursors (without hold) disappear at transaction end.  You need to
ensure you have done Connection.setAutoCommit(false) or else the cursor
will disappear before you can fetch from it.

>            cs.registerOutParameter(1, java.sql.Types.JAVA_OBJECT);

This should also be Types.OTHER instead of JAVA_OBJECT.

Kris Jurka

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: burferd
Дата:
Сообщение: Newby Question - accessing refcursor.
Следующее
От: burferd
Дата:
Сообщение: Re: Newby Question - accessing refcursor.