Skip site navigation (1) Skip section navigation (2)

Re: Callablestatement's resulting resultset not scrollable

From: Kris Jurka <jurka(at)ejurka(dot)com>
To: ron <bragustin(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Callablestatement's resulting resultset not scrollable
Date: 2006-08-01 00:11:08
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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, 
>          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(at)postgresql(dot)org(dot)

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 

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


pgsql-jdbc by date

Next:From: ronDate: 2006-08-01 04:25:35
Subject: Re: Callablestatement's resulting resultset not scrollable
Previous:From: Roland WalterDate: 2006-07-31 07:37:13
Subject: Re: literal value in the select fieldlist returns not the string, but a java String object

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group