getting primary key values for inserted records?

From: Guido Fiala <guido(dot)fiala(at)dka-gmbh(dot)de>
To: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: getting primary key values for inserted records?
Date: 2004-01-27 13:17:43
Message-ID: 200401271417.43767.guido.fiala@dka-gmbh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hallo,

I'am currently at the point, that after i insert a new Record in a ResultSet
using insertRow() and using a serial for the primary key of the target table.

Of course i do not call rs.updateInt(primaryKey), as the sequence does get me
the new value automatically.

However - even using rs.refreshRow() doesn't get me the values, just a requery
of the ResultSet.

What is the way to go here?

Guido

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message sandrine wamy wapet 2004-01-27 15:10:30 Re: Connection problem
Previous Message Kris Jurka 2004-01-27 08:45:26 Re: Patch to readd documentation