pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Callablestatement's resulting resultset not scrollable
4+ messages / 3 participants
[nested] [flat]
* Re: Callablestatement's resulting resultset not scrollable
@ 2006-08-01 00:11 Kris Jurka <jurka@ejurka.com>
2006-08-01 04:25 ` Re: Callablestatement's resulting resultset not scrollable ron <bragustin@gmail.com>
0 siblings, 1 reply; 4+ messages in thread
From: Kris Jurka @ 2006-08-01 00:11 UTC (permalink / raw)
To: ron <bragustin@gmail.com>; +Cc: pgsql-jdbc
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
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Callablestatement's resulting resultset not scrollable
2006-08-01 00:11 Re: Callablestatement's resulting resultset not scrollable Kris Jurka <jurka@ejurka.com>
@ 2006-08-01 04:25 ` ron <bragustin@gmail.com>
2006-08-02 04:05 ` Re: Callablestatement's resulting resultset not scrollable ron <bragustin@gmail.com>
2006-08-06 18:15 ` Re: Callablestatement's resulting resultset not scrollable Kris Jurka <books@ejurka.com>
0 siblings, 2 replies; 4+ messages in thread
From: ron @ 2006-08-01 04:25 UTC (permalink / raw)
To: pgsql-jdbc
Thanks a lot, Kris.
For clarification, is this then a JDBC patch work that need to be done to
enable scrollability feature in the ResultSet via CallableStatement?
Domo arigato!
ron
On 8/1/06, Kris Jurka <jurka@ejurka.com> wrote:
>
> 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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
--
R. Agustin
- - - - - - - - - - - - - - - - - - - - - - - - - -
E-mail: bragustin@gmail.com
ICQ #: 146807041
_______________________________________
This email contains confidential information for the sole use of the
intended
recipient/s. If you are not the intended recipient, please contact
the sender, delete this email and maintain the confidentiality of what
you may have read.
"It is a capital mistake to theorize before one has data."
- Sherlock Holmes
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Callablestatement's resulting resultset not scrollable
2006-08-01 00:11 Re: Callablestatement's resulting resultset not scrollable Kris Jurka <jurka@ejurka.com>
2006-08-01 04:25 ` Re: Callablestatement's resulting resultset not scrollable ron <bragustin@gmail.com>
@ 2006-08-02 04:05 ` ron <bragustin@gmail.com>
1 sibling, 0 replies; 4+ messages in thread
From: ron @ 2006-08-02 04:05 UTC (permalink / raw)
To: pgsql-jdbc
Hi Diego,
I'm still using jdk 1.5.
May I know what version of PostgreSQL JDBC driver you've used with
jdk1.6.0-beta2-b82?
If you've switched to the b92 version of jdk, don't you think there's a need
for a corresponding update or upgrade to the PostgreSQL driver you're using
to go with that new version? The JDBC driver, afterall, is still what drives
the PostgreSQL in a Java context.
Anyway, while waiting for the scrollability feature of the
CallableStatement's resultset, I opted to work around it using
PreparedStatement to answer my current concern for a scrollable resultset.
I've used a PostgreSQL stored function and called it through a
preparedstatement.
Regards.
On 8/1/06, dgil@mendoza.gov.ar <dgil@mendoza.gov.ar> wrote:
>
> Ron:
>
> Are you using jdk 1.6.0 (mustang) ?. I got same kind of errors
> (TYPE_FORWARD_ONLY while required a non TYPE_FORWARD_ONLY) while using
> CachecRowSetImpl with jdk 1.6.0 b92. It works Ok with b82.
>
> Regards,
> Diego.
>
>
--
R. Agustin
- - - - - - - - - - - - - - - - - - - - - - - - - -
E-mail: bragustin@gmail.com
ICQ #: 146807041
_______________________________________
This email contains confidential information for the sole use of the
intended
recipient/s. If you are not the intended recipient, please contact
the sender, delete this email and maintain the confidentiality of what
you may have read.
"It is a capital mistake to theorize before one has data."
- Sherlock Holmes
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Callablestatement's resulting resultset not scrollable
2006-08-01 00:11 Re: Callablestatement's resulting resultset not scrollable Kris Jurka <jurka@ejurka.com>
2006-08-01 04:25 ` Re: Callablestatement's resulting resultset not scrollable ron <bragustin@gmail.com>
@ 2006-08-06 18:15 ` Kris Jurka <books@ejurka.com>
1 sibling, 0 replies; 4+ messages in thread
From: Kris Jurka @ 2006-08-06 18:15 UTC (permalink / raw)
To: ron <bragustin@gmail.com>; +Cc: pgsql-jdbc
On Tue, 1 Aug 2006, ron wrote:
>
> For clarification, is this then a JDBC patch work that need to be done to
> enable scrollability feature in the ResultSet via CallableStatement?
>
Yes, I've commited a fix to CVS for 8.0, 8.1, and 8.2dev.
Kris Jurka
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2006-08-06 18:15 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-08-01 00:11 Re: Callablestatement's resulting resultset not scrollable Kris Jurka <jurka@ejurka.com>
2006-08-01 04:25 ` ron <bragustin@gmail.com>
2006-08-02 04:05 ` ron <bragustin@gmail.com>
2006-08-06 18:15 ` Kris Jurka <books@ejurka.com>
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