Re: Primary Key Error Updating Rows in ResultSet

From: Kris Jurka <books(at)ejurka(dot)com>
To: Peter Smith <smithp(at)internode(dot)on(dot)net>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Primary Key Error Updating Rows in ResultSet
Date: 2004-11-30 06:12:21
Message-ID: Pine.BSO.4.56.0411300109300.10837@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Tue, 30 Nov 2004, Peter Smith wrote:

> I'm getting the error 'java.sql.SQLException: No Primary Keys' when
> trying to update a resultset based on a table with a primary key.
>

It is not enough to have a primary key on the table, you must also select
those columns in your ResultSet. Further, the code to determine the table
in question isn't very good and is easily fooled. What is your exact
SELECT statement and primary key definition?

Kris Jurka

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kris Jurka 2004-11-30 06:18:05 Re: Translation update: pt_BR
Previous Message Peter Smith 2004-11-30 05:41:19 Primary Key Error Updating Rows in ResultSet