Re: [INTERFACES] How to get oid of newly inserted row with JDBC? - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: [INTERFACES] How to get oid of newly inserted row with JDBC?
Date
Msg-id 01dc01c19d3b$a89d7fd0$c201a8c0@inspiron
Whole thread Raw
In response to Re: [INTERFACES] How to get oid of newly inserted row with JDBC?  (Barry Lind <barry@xythos.com>)
List pgsql-jdbc
You can cast the ResultSet to a org.postgresql.ResultSet and then call
getLastOID() to get the last inserted OID

Dave

-----Original Message-----
From: pgsql-jdbc-owner@postgresql.org
[mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Barry Lind
Sent: Monday, January 14, 2002 1:15 PM
To: glos@gmx.net
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [JDBC] [INTERFACES] How to get oid of newly inserted row
with JDBC?


This should be posted to the pgsql-jdbc mail list.  Could you provide
some more details of your problem?  A test case in java would help a
lot.  There isn't enough information here for me to understand your
problem.

thanks,
--Barry


glos@gmx.net wrote:

> Hello,
>
> I inserted a serialized object in a PostgreSQL database using jdbc.
> Now I want to get back the OID of the inserted object (to store in
> other database). How do I do that, because my ResultSet gives back
> 0/zero all the time.
>
> Thanx in advance.
> G.
>
>



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html



pgsql-jdbc by date:

Previous
From: Jason Davies
Date:
Subject: Re: Problem with getImportedKeys / getExportedKeys
Next
From: Ola Sundell
Date:
Subject: CVS problems?