Обсуждение: Postgres 7.3b1 + pg73b1jdbc3 rs.last() error

Поиск
Список
Период
Сортировка

Postgres 7.3b1 + pg73b1jdbc3 rs.last() error

От
Laurentiu Drob
Дата:
Greetings,

I have a problem running the following code:
...
rs = st.executeQuery("SELECT * FROM foo");
...
rs.last();

I get:
Exception in thread "main" java.lang.NullPointerException
         at
org.postgresql.jdbc2.AbstractJdbc2ResultSet.last(AbstractJdbc2ResultSet.java:414)
         at tjdbc.main(tjdbc.java:53)

The table foo has one record;

JAVA is:
java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)

JDBC driver is:  pg73b1jdbc3.jar

Many thanks for your suggestions!

    Best regards,
       lwd.


Re: Postgres 7.3b1 + pg73b1jdbc3 rs.last() error

От
Laurentiu Drob
Дата:
Laurentiu Drob wrote:

 > Many thanks for your suggestions!
 >
 >     Best regards,
 >        lwd.
 >
My suggestion is check  and recheck your code harder before post a
message :(.

    Regards,
       lwd.