Re: jdbc3 and ResultSet.getFetchSize()

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: jdbc3 and ResultSet.getFetchSize()
Дата
Msg-id Pine.BSO.4.56.0504302311390.29492@leary.csoft.net
обсуждение исходный текст
Ответ на jdbc3 and ResultSet.getFetchSize()  (Michal Hlavac <hlavki@hlavki.sk>)
Список pgsql-general

On Tue, 26 Apr 2005, Michal Hlavac wrote:

> I have this code:
> ResultSet rs = stmt.executeQuery("SELECT attr FROM table WHERE id=1");
> System.out.println(rs.getFetchSize());
>
> rs.getFetchSize() everytime returns 0... why???

The fetch size is a hint for the driver to know how many rows at a time to
retrieve from the database.  If you haven't given the driver any hints it
is set to zero meaning "If the fetch size specified is zero, the JDBC
driver ignores the value and is free to make its own best guess as to what
the fetch size should be."  Older drivers used to report the number of
rows fetched in this method, but that was just an implementation artifact
at best and a bug at worst.

Kris Jurka


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

Предыдущее
От: Typing80wpm@aol.com
Дата:
Сообщение: Postgresql and small office p2p networks & ODBC
Следующее
От: "A. Mous"
Дата:
Сообщение: Re: VB ODBC connection to Postgresql, DAO,ADO,RDO,DSN???