X-Original-To: pgsql-odbc@postgresql.org Received: from localhost (developer.postgresql.org [64.117.224.193]) by developer.postgresql.org (Postfix) with ESMTP id 42610925D9D for ; Fri, 30 May 2003 17:03:06 -0400 (EDT) Received: from developer.postgresql.org ([64.117.224.193]) by localhost (developer.postgresql.org [64.117.224.193:10024]) (amavisd-new) with ESMTP id 10868-07 for ; Fri, 30 May 2003 17:03:01 -0400 (EDT) Received: from sccrmhc01.attbi.com (sccrmhc01.attbi.com [204.127.202.61]) by developer.postgresql.org (Postfix) with ESMTP id 2975B925D93 for ; Fri, 30 May 2003 17:03:01 -0400 (EDT) Received: from d7mkwd21 (12-233-90-196.client.attbi.com[12.233.90.196]) by attbi.com (sccrmhc01) with SMTP id <2003053021030000100hrshre>; Fri, 30 May 2003 21:03:00 +0000 Message-ID: <000a01c326ee$dcd67520$02120a0a@D7MKWD21> From: "Patrick Hatcher" To: Subject: Currval not working Date: Fri, 30 May 2003 14:03:03 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C326B4.300EC930" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new X-Archive-Number: 200305/74 X-Sequence-Number: 2974 This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C326B4.300EC930 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable 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 pu= ll 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 ------=_NextPart_000_0007_01C326B4.300EC930 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
PG: 7.3.3
Driver version: 7.03.01
 
I'm using VB as a front-end to end data in= to PG=20 database.  When I try to pull the current value of my serial field usi= ng=20 this code:
rs.open "selec= t=20 currval('public.hodiv_hodiv_id_seq');",CN
I get this error message:
ERROR: hodiv_hodiv_id_seq.currval is not y= et=20 defined in this session.
However, if use nextval it works fine.
rs.open "selec= t=20 nextval('public.hodiv_hodiv_id_seq');",CN
 
Any ideas?
 
TIA
Patrick
 

 

------=_NextPart_000_0007_01C326B4.300EC930--