Re: Wrong results of queries - Mailing list pgsql-jdbc

From Kevin Grittner
Subject Re: Wrong results of queries
Date
Msg-id 4BE950BF0200002500031537@gw.wicourts.gov
Whole thread Raw
In response to Wrong results of queries  ("I. B." <i.bre@live.com>)
List pgsql-jdbc
"I. B." <i.bre@live.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

pgsql-jdbc by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Fwd: JDBC driver PostgreSQL - Question
Next
From: Craig Ringer
Date:
Subject: New code: Easy PKCS#12 client certificate support for pgjdbc