From: student23 <student23@o2.pl>
To: pgsql-jdbc@postgresql.org
Subject: I can't retrieve a scrollable ResultSet from CallableStatement
Date: Mon, 21 Aug 2006 10:06:54 +0200
Message-ID: <1bb1c4b7.3cc5f391.44e9699e.c7fbf@o2.pl> (raw)
Hi,
I'm using posgresql 7.4 and I'm trying to receive a scrollable and updatable ResulSet with jdbc. But when I when I check the type of the ResultSet I've retrieved its always FORWARD_ONLY. I use jdbc3 driver.
the code:
CallableStatement call = con.prepareCall("{ ? = call getRefcursor () }", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
call.registerOutParameter(1, Types.OTHER);
call.execute();
ResultSet rs = (ResultSet) call.getObject(1);
rs.last(); //this line throws the Exception
What do I need to do, to make it work!
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: student23@o2.pl
Subject: Re: I can't retrieve a scrollable ResultSet from CallableStatement
In-Reply-To: <1bb1c4b7.3cc5f391.44e9699e.c7fbf@o2.pl>
References: <1bb1c4b7.3cc5f391.44e9699e.c7fbf@o2.pl>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox