Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group