Currval not working

From: "Patrick Hatcher" <pathat(at)attbi(dot)com>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: Currval not working
Date: 2003-05-30 21:03:03
Message-ID: 000a01c326ee$dcd67520$02120a0a@D7MKWD21
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

PG: 7.3.3
Driver version: 7.03.01

I'm using VB as a front-end to end data into PG database. When I try to pull the current value of my serial field using this code:
rs.open "select currval('public.hodiv_hodiv_id_seq');",CN
I get this error message:
ERROR: hodiv_hodiv_id_seq.currval is not yet defined in this session.
However, if use nextval it works fine.
rs.open "select nextval('public.hodiv_hodiv_id_seq');",CN

Any ideas?

TIA
Patrick

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Bruce Momjian 2003-06-01 04:32:43 Re: select between two databases
Previous Message Jeff Silberberg 2003-05-30 18:48:24 PSgreSQL Driver Security question..