Thread: I can't retrieve a scrollable ResultSet from CallableStatement
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 checkthe 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!
On Mon, 21 Aug 2006, student23 wrote: > 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. > > What do I need to do, to make it work! > I recently committed a fix to CVS for 8.0, 8.1 and HEAD branches to make these ResultSets scrollable, so you will need to build a new jar file from CVS. These ResultSets cannot be updatable because the server does not support updatable cursors. Kris Jurka