Thread: Re: [INTERFACES] How to get oid of newly inserted row with JDBC?

Re: [INTERFACES] How to get oid of newly inserted row with JDBC?

From
Barry Lind
Date:
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.
>
>



Re: [INTERFACES] How to get oid of newly inserted row with JDBC?

From
"Dave Cramer"
Date:
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



Notify

From
David Siebert
Date:
Is there a way to do a NOTIFY/LISTEN using JDBC?



__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/