Problem with JDBC driver: rs.next() is always null - Mailing list pgsql-interfaces

From Sasha
Subject Problem with JDBC driver: rs.next() is always null
Date
Msg-id 3A853D98.2070308@iperbole.bologna.it
Whole thread Raw
Responses Re: Problem with JDBC driver: rs.next() is always null  (Peter T Mount <peter@retep.org.uk>)
List pgsql-interfaces
Hello there!

I'm trying to connect to a postgresql via the JDBC interface as follow:

...
Statement st=db.createStatement();    ResultSet rs=st.executeQuery("select datname from pg_database");
while(rs.next()){     out.addItem(rs.getString(1));      }      rs.close();      st.close();
 
....

The JVM throws a nullPointerException.
It seems that rs.next() is null even if the result set is not empty.

I'm working with Inprise Jbuilder 4 Foundation and Redhat Linux 7.0 
(kernel 2.2.16) running on my Athlon 750.

If anyone could help me I would appreciate.

P.S.:Sorry for my english!



pgsql-interfaces by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Re: PostgreSQL and PHP persistent connections
Next
From: Andrew Otwell
Date:
Subject: Pg.pm problems from PostgreSQL and from cpan.org