Re: JDBC 2 ResultSet and cursors

From: Jakub Labath <jakub(at)labath(dot)org>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: JDBC 2 ResultSet and cursors
Date: 2001-10-16 15:21:57
Message-ID: 20011016112157.A30288@labath.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi Peter

> Why the scrollable result sets are not implemented in the current jdbc
> driver? Is it technically impossible or just no one needed this feature yet?

As far as I know the read-only result sets are working in the recent drivers.

for instance
Statement stm = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
ResultSet rs = stm.executeQuery("SELECT * FROM foolist");
rs.afterLast();
System.out.println("Printing it reversed");
while (rs.previous()){
System.out.println(rs.getString("id")+", "+rs.getString("text"));
}

works just fine with the latest stable driver
the same is true for last()/first() relative() and absolute() methods.

Regards

--
Jakub Labath

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Marko Kreen 2001-10-16 18:29:03 Ant configuration
Previous Message Michael Moyle 2001-10-16 11:02:48 stack dump