Re: org.postgresql.util.PSQLException Column name candidates.id

From: Kris Jurka <books(at)ejurka(dot)com>
To: Roman Chervotkin <roman(dot)chervotkin(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: org.postgresql.util.PSQLException Column name candidates.id
Date: 2005-11-24 19:52:28
Message-ID: Pine.BSO.4.61.0511241450350.7676@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Thu, 24 Nov 2005, Roman Chervotkin wrote:

> I have query in my application "SELECT * FROM candidates WHERE
> candidates.id=?"
>
> so after query executed I've got exception
> *Exception Details: * org.postgresql.util.PSQLException
> Der Spaltenname candidates.id wurde in diesem ResultSet nicht gefunden,
>

This error is complaining about calling ResultSet.getXXX("candidates.id"),
not the execution of the query. You need to call getXXX("id"), you may
not qualify resulting column with the source tablename.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2005-11-24 20:47:43 Re: Can PostgreSQL do data type automated casting in
Previous Message Thomas Kellerer 2005-11-24 16:34:00 Re: Why is bool == java.sql.Types.BIT ??