JDBC ResultSet

Поиск
Список
Период
Сортировка
От Stoffel van Aswegen
Тема JDBC ResultSet
Дата
Msg-id 9D8BB61A24FCD0118E83080036CE960301491D91@ntserver01.gmsi.co.za
обсуждение исходный текст
Ответы Re: JDBC ResultSet
Список pgsql-novice
I have the following Java code:

---snip---
    ResultSet rst = pgConnection.openResultSet("SELECT foo, bar from
table1");
    while (rst.next))
        System.out.println(rst.getString("foo"),
rst.getString("bar"));
---snip---
[I'm writing from memory - not sure if openResultSet is the correct method
name.]

This always only prints _one_ record, which is also the last record. The
docs say that the cursor opens before the first record, so I must be doing
something wrong.

I am using PostgreSQL 6.5 database (yes, I know it's old, but I'm only
playing/learning/prototyping/...) Surely, this is not a pg6.5 problem? Or is
it?

I'd appreciate any pointers.
TIA

Stoffel van Aswegen
import signature.*;


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

Предыдущее
От: "Stephan Szabo"
Дата:
Сообщение: Re: Corrupted table . . .
Следующее
От: "Travis Hoyt"
Дата:
Сообщение: Rules and Views