NullPointerException when calling ResultSet.absolute(int)

Поиск
Список
Период
Сортировка
От Clemens Eisserer
Тема NullPointerException when calling ResultSet.absolute(int)
Дата
Msg-id 194f625505082810015456609c@mail.gmail.com
обсуждение исходный текст
Ответы Re: NullPointerException when calling ResultSet.absolute(int)  (Clemens Eisserer <linuxhippy@gmail.com>)
Re: NullPointerException when calling ResultSet.absolute(int)  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Hi there!

I've installed PostgreSQL-7.4 on my system and I am really impressed
about the features and stability PostgreSQL provides. Its an excellent
piece of software!

However I've written a Swing-Table which displays data directly from a
ResultSet, and this works great if I select all rows, but when doing a
more specific search I get a NullPointerException:


Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at org.postgresql.jdbc2.AbstractJdbc2ResultSet.absolute(AbstractJdbc2ResultSet.java:184)
    at CATableModel.getValueAt(CATableModel.java:88)
    at javax.swing.JTable.getValueAt(JTable.java:1852)

Any ideas what could be the cause?

Thank you in advance, lg Clemens

btw. is there a more intelligent way to find out how many lines have
been selected than starting two queries where the one query just
queries the row-count?
I did not find any better solution, but for complex queries this is
really inefficient :-(

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

Предыдущее
От: David Gagnon
Дата:
Сообщение: Re: implementing asynchronous notifications PLEASE CONFIRM MY
Следующее
От: Clemens Eisserer
Дата:
Сообщение: Re: NullPointerException when calling ResultSet.absolute(int)