pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sasha <ber0806@iperbole.bologna.it>
To: pgsql-interfaces@postgresql.org
Subject: Problem with JDBC driver: rs.next() is always null
Date: Sat, 10 Feb 2001 14:09:44 +0100
Message-ID: <3A853D98.2070308@iperbole.bologna.it> (raw)

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!




view thread (2+ messages)  latest in thread

Message-ID: <3A853D98.2070308@iperbole.bologna.it>
Permalink:  ../3A853D98.2070308@iperbole.bologna.it/
Also on:    postgresql.org/message-id/3A853D98.2070308@iperbole.bologna.it

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: ber0806@iperbole.bologna.it
  Subject: Re: Problem with JDBC driver: rs.next() is always null
  In-Reply-To: <3A853D98.2070308@iperbole.bologna.it>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox