I can't retrieve a scrollable ResultSet from CallableStatement

From: student23 <student23(at)o2(dot)pl>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: I can't retrieve a scrollable ResultSet from CallableStatement
Date: 2006-08-21 08:06:54
Message-ID: 1bb1c4b7.3cc5f391.44e9699e.c7fbf@o2.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi,

I'm using posgresql 7.4 and I'm trying to receive a scrollable and updatable ResulSet with jdbc. But when I when I check the type of the ResultSet I've retrieved its always FORWARD_ONLY. I use jdbc3 driver.

the code:

CallableStatement call = con.prepareCall("{ ? = call getRefcursor () }", ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);

call.registerOutParameter(1, Types.OTHER);
call.execute();
ResultSet rs = (ResultSet) call.getObject(1);

rs.last(); //this line throws the Exception

What do I need to do, to make it work!

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jon Horsman 2006-08-21 19:03:42 Permission denied for sequece...
Previous Message Kris Jurka 2006-08-21 03:03:17 Re: Small problem with special characters