Re: Wrong results of queries

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "I(dot) B(dot)" <i(dot)bre(at)live(dot)com>,<pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Wrong results of queries
Date: 2010-05-11 17:42:39
Message-ID: 4BE950BF0200002500031537@gw.wicourts.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"I. B." <i(dot)bre(at)live(dot)com> wrote:
> I use this code:
> String query = "SELECT d AS result FROM test WHERE id=" + dbid;
> ResultSet rs = conn.ExecuteQuery(query);
> String mpoint = rs.getString("result");

Shouldn't you have a rs.next() in there before the rs.getString?

-Kevin

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Gnanakumar 2010-05-12 10:34:39 Invalid message format Exception
Previous Message Kevin Grittner 2010-05-11 17:40:13 Re: Fwd: JDBC driver PostgreSQL - Question