X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 0EAA49FB427 for ; Tue, 1 Aug 2006 03:24:23 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 77815-02-9 for ; Tue, 1 Aug 2006 03:23:55 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by postgresql.org (Postfix) with ESMTP id 7657B9FB426 for ; Tue, 1 Aug 2006 01:25:38 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id b36so769642pyb for ; Mon, 31 Jul 2006 21:25:37 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=uZDjDy25deu3qQGxJTzozyeiRCX1saaqeIPu/kc9KUHh9qzahD7p1yq8vJ3UKNKelwD1YaWUov1mONqEOgHV4C0FLA4jqnTVFlBOGEWCq5WWqliwROB9Bx+WnEbX6vro2kMpeeejVf3rLYpTflmRgP0E/7ujc3X5et37yhF6M58= Received: by 10.65.211.1 with SMTP id n1mr3022663qbq; Mon, 31 Jul 2006 21:25:35 -0700 (PDT) Received: by 10.65.35.19 with HTTP; Mon, 31 Jul 2006 21:25:35 -0700 (PDT) Message-ID: Date: Tue, 1 Aug 2006 12:25:35 +0800 From: ron To: pgsql-jdbc@postgresql.org Subject: Re: Callablestatement's resulting resultset not scrollable In-Reply-To: <44CE9C1C.1050305@ejurka.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_16969_9821882.1154406335575" References: <44CE9C1C.1050305@ejurka.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.383 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE, HTML_30_40, HTML_MESSAGE, SPF_PASS X-Spam-Level: ** X-Archive-Number: 200608/1 X-Sequence-Number: 15528 ------=_Part_16969_9821882.1154406335575 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline 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 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 ------=_Part_16969_9821882.1154406335575 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline 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
------=_Part_16969_9821882.1154406335575--