pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christian Rengstl <Christian.Rengstl@klinik.uni-regensburg.de>
To: Christian Rengstl <rec08392.KLINIK.uni-regensburg@klinik.uni-regensburg.de>
To: pgsql-jdbc@postgresql.org
Subject: Re: Update ResultSet
Date: Wed, 10 Oct 2007 14:35:07 +0200
Message-ID: <470CE378.90AD.0080.0@klinik.uni-regensburg.de> (raw)
In-Reply-To: <470CE177.90AD.0080.0@klinik.uni-regensburg.de>
References: <470CE177.90AD.0080.0@klinik.uni-regensburg.de>

Just to clarify: there is of course a primary key and it's included in
the select.
Anyway, I'm still happy for any advice ;-)


Christian Rengstl M.A.
Klinik und Poliklinik für Innere Medizin II
Kardiologie - Forschung
Universitätsklinikum Regensburg
B3 1.388
Franz-Josef-Strauss-Allee 11
93053 Regensburg
Tel.: +49-941-944-7230




>>> On Wed, Oct 10, 2007 at  2:26 PM, in message
<470CE177.90AD.0080.0@klinik.uni-regensburg.de>, "Christian Rengstl"
<Christian.Rengstl@klinik.uni-regensburg.de> wrote: 
> Hi everyone,
> 
> I have a query including an inner join, which I execute to obtain a
> ResultSet, but when I execute the following piece of code I get an
error
> message saying that it could not update the table because it could
not
> find the primary key for a table.
> rs.first();
> rs.updateString("gene", "TestGen");
> rs.updateRow();
> 
> Here is my query:
> SELECT gene_entropy.gene, gene_entropy.entropy,
gene_entropy.iteration,
> snp_entropy.snp_id
>    FROM clustering.gene_entropy INNER JOIN clustering.snp_entropy
> USING(gene) limit 5;
> 
> And here is the stacktrace:
> org.postgresql.util.PSQLException: Für die Tebelle
> (clustering.gene_entropy konnte kein Primärschlüssel gefunden
werden.
>         at
>
org.postgresql.jdbc2.AbstractJdbc2ResultSet.isUpdateable(AbstractJdbc2Result
> Set.java:1547)
>         at
>
org.postgresql.jdbc2.AbstractJdbc2ResultSet.checkUpdateable(AbstractJdbc2Res
> ultSet.java:2550)
>         at
>
org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateValue(AbstractJdbc2ResultS
> et.java:2796)
>         at
>
org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateString(AbstractJdbc2Result
> Set.java:1309)
>         at
>
org.postgresql.jdbc2.AbstractJdbc2ResultSet.updateString(AbstractJdbc2Result
> Set.java:1394)
>         at
>
myapp.ui.event.DBTableFrameListener.actionPerformed(DBTableFrameListener.jav
> a:406)
>         at
>
javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
>         at
>
javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
>         at
>
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:3
> 87)
>         at
>
javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
>         at
>
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener
> .java:236)
>         at
>
java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
>         at java.awt.Component.processMouseEvent(Component.java:6038)
>         at
> javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
>         at java.awt.Component.processEvent(Component.java:5803)
>         at java.awt.Container.processEvent(Container.java:2058)
>         at java.awt.Component.dispatchEventImpl(Component.java:4410)
>         at java.awt.Container.dispatchEventImpl(Container.java:2116)
>         at java.awt.Component.dispatchEvent(Component.java:4240)
>         at
>
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
>         at
>
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
>         at
> java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
>         at java.awt.Container.dispatchEventImpl(Container.java:2102)
>         at java.awt.Window.dispatchEventImpl(Window.java:2429)
>         at java.awt.Component.dispatchEvent(Component.java:4240)
>         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
>         at
>
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java
> :273)
>         at
>
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:18
> 3)
>         at
>
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
> :173)
>         at
>
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
>         at
>
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
>         at
> java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
> 
> I am more than happy and thankful for any advice!
> 
> 
> 
> Christian Rengstl M.A.
> Klinik und Poliklinik für Innere Medizin II
> Kardiologie - Forschung
> Universitätsklinikum Regensburg
> B3 1.388
> Franz-Josef-Strauss-Allee 11
> 93053 Regensburg
> Tel.: +49-941-944-7230
> 
> 
> 
> 
> ---------------------------(end of
broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do
not
>        match




view thread (7+ messages)  latest in thread

Message-ID: <470CE378.90AD.0080.0@klinik.uni-regensburg.de>
Permalink:  ../470CE378.90AD.0080.0@klinik.uni-regensburg.de/
Also on:    postgresql.org/message-id/470CE378.90AD.0080.0@klinik.uni-regensburg.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: Christian.Rengstl@klinik.uni-regensburg.de, rec08392.KLINIK.uni-regensburg@klinik.uni-regensburg.de
  Subject: Re: Update ResultSet
  In-Reply-To: <470CE378.90AD.0080.0@klinik.uni-regensburg.de>
  References: <470CE177.90AD.0080.0@klinik.uni-regensburg.de> <470CE378.90AD.0080.0@klinik.uni-regensburg.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox