From: Kris Jurka <jurka@ejurka.com>
To: ron <bragustin@gmail.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Callablestatement's resulting resultset not scrollable
Date: Mon, 31 Jul 2006 17:11:08 -0700
Message-ID: <44CE9C1C.1050305@ejurka.com> (raw)
In-Reply-To: <cdde6360607310614u28f3818ev15453b0b2848caa1@mail.gmail.com>
References: <cdde6360607310614u28f3818ev15453b0b2848caa1@mail.gmail.com>
ron wrote:
> My PostgreSQL server is version 8.0 and I'm using
> postgresql-8.2dev-503.jdbc3.jar for my JDBC type 3 driver. I am
> wondering how come I always get a TYPE_FORWARD_ONLY type of resultset
> out of my callablestatement as shown below despite having given the
> necessary parameters to my prepareCall method in order to obtain a
> scrollable resultset. A SQLException errors occurs once I attempt to
> move the resultset pointer with qRs.last() owing to the resulting
> TYPE_FORWARD_ONLY resultset. How do I correct this?
>
> con.setAutoCommit(false);
> String sSQLCall = "{? = call
> \"DEMO\".fn_ins_update_employee_rec(?,?,?,?,?,?,?)}";
> cs =
> con.prepareCall(sSQLCall,ResultSet.TYPE_SCROLL_INSENSITIVE,
> ResultSet.CONCUR_UPDATABLE);
> cs.registerOutParameter(1, Types.OTHER);
> cs.execute();
> this.qRs = (ResultSet) cs.getObject(1);
> qRs.last();
>
You've sent this to the list owner address, please send all non list
administration questions to pgsql-jdbc@postgresql.org.
It wouldn't be hard to allow scrolling, we just need to get that
scrolling flag to the ResultSet. Allowing updates is not going to
happen without some significant work. The backend would need to support
updatable cursors because the driver has no idea what the cursor is
actually accessing so it cannot issue updates as it does for regular
ResultSets.
I'm travelling at the moment, but will be back home next week and will
hopefully look at this and all the other pending JDBC patches/issues.
Kris Jurka
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: jurka@ejurka.com, bragustin@gmail.com
Subject: Re: Callablestatement's resulting resultset not scrollable
In-Reply-To: <44CE9C1C.1050305@ejurka.com>
References: <cdde6360607310614u28f3818ev15453b0b2848caa1@mail.gmail.com> <44CE9C1C.1050305@ejurka.com>
* 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