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 0EE069FA48B for ; Mon, 31 Jul 2006 21:11:39 -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 46410-01 for ; Mon, 31 Jul 2006 21:11:32 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with SMTP id E77719FB2BE for ; Mon, 31 Jul 2006 21:11:20 -0300 (ADT) Received: (qmail 110 invoked from network); 1 Aug 2006 00:11:09 -0000 Received: from unknown (HELO ?127.0.0.1?) (127.0.0.1) by localhost with SMTP; 1 Aug 2006 00:11:09 -0000 Message-ID: <44CE9C1C.1050305@ejurka.com> Date: Mon, 31 Jul 2006 17:11:08 -0700 From: Kris Jurka User-Agent: Thunderbird 1.5.0.4 (X11/20060619) MIME-Version: 1.0 To: ron CC: pgsql-jdbc@postgresql.org Subject: Re: Callablestatement's resulting resultset not scrollable References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200607/101 X-Sequence-Number: 15527 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