Re: JDBC 2 ResultSet and cursors

Поиск
Список
Период
Сортировка
От Jakub Labath
Тема Re: JDBC 2 ResultSet and cursors
Дата
Msg-id 20011016112157.A30288@labath.org
обсуждение исходный текст
Ответ на JDBC 2 ResultSet and cursors  (Kovács Péter <peter.kovacs@sysdata.siemens.hu>)
Список 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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Barry Lind
Дата:
Сообщение: Re: Function calls via JDBC
Следующее
От: Joseph Shraibman
Дата:
Сообщение: Re: J2SE 1.4 and other patches