pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
getGeneratedKeys()
2+ messages / 2 participants
[nested] [flat]

* getGeneratedKeys()
@ 2005-04-01 00:05 Jamie Deppeler <jamie@doitonce.net.au>
  2005-04-01 00:33 ` Re: getGeneratedKeys() Joshua D. Drake <jd@commandprompt.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Jamie Deppeler @ 2005-04-01 00:05 UTC (permalink / raw)
  To: pgsql-general@postgresql.org

Hi to all,

I have one problem with PostgreSQL and Java. I have a table with Primary 
key(serial) field, but after I insert a record i am unable to retrieve 
this value.  I have tried getGeneratedKeys() and i get nothing returned.

There is another method to retrieve this field?

thanks




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: getGeneratedKeys()
  2005-04-01 00:05 getGeneratedKeys() Jamie Deppeler <jamie@doitonce.net.au>
@ 2005-04-01 00:33 ` Joshua D. Drake <jd@commandprompt.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Joshua D. Drake @ 2005-04-01 00:33 UTC (permalink / raw)
  To: Jamie Deppeler <jamie@doitonce.net.au>; +Cc: pgsql-general@postgresql.org

On Fri, 2005-04-01 at 10:05 +1000, Jamie Deppeler wrote:
> Hi to all,
> 
> I have one problem with PostgreSQL and Java. I have a table with Primary 
> key(serial) field, but after I insert a record i am unable to retrieve 
> this value.  I have tried getGeneratedKeys() and i get nothing returned.

I am not a Java programmer but normally I would use select currval
('sequencename');


> 
> There is another method to retrieve this field?
> 
> thanks
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
> 
>                http://archives.postgresql.org
-- 
Command Prompt, Inc., Your PostgreSQL solutions company. 503-667-4564
Custom programming, 24x7 support, managed services, and hosting
Open Source Authors: plPHP, pgManage, Co-Authors: plPerlNG
Reliable replication, Mammoth Replicator - http://www.commandprompt.com/




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-04-01 00:33 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-01 00:05 getGeneratedKeys() Jamie Deppeler <jamie@doitonce.net.au>
2005-04-01 00:33 ` Joshua D. Drake <jd@commandprompt.com>

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