Re: The old Insert and retrieving your Serial problem in VB

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: John McCawley <nospam(at)hardgeus(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: The old Insert and retrieving your Serial problem in VB
Date: 2006-11-14 22:30:04
Message-ID: 20061114223004.GI26120@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Nov 14, 2006 at 03:54:42PM -0600, John McCawley wrote:
> I am once again dealing with that age old problem of retrieving the
> value of your inserted serial field in VB. I am fully aware that I can
> manually pull the currval or nextval from my sequence, but I consider
> having to manually deal with an auto-generated database object an
> *extremely* inelegant solution.

Maybe you're looking for lastval()?

http://www.postgresql.org/docs/8.1/interactive/functions-sequence.html

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Clarence Gardner 2006-11-14 22:36:04 Not your father's question about deadlocks
Previous Message Clarence Gardner 2006-11-14 22:14:40 Not your father's question about deadlocks