Skip site navigation (1) Skip section navigation (2)

calling nextval function

From: "Gosling, Oliver" <o(dot)gosling(at)lancaster(dot)ac(dot)uk>
To: <pgsql-odbc(at)postgresql(dot)org>
Subject: calling nextval function
Date: 2004-12-06 15:11:15
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
Does anybody know how to get the next value of a sequence?


I'm presuming that nextval is an SQL procedure in postgres which can be
called by passing the name of the sequence as a parameter. The code
below shows what I've done in VB. This does not work however - JET
throws up an error saying that 'nextval' table or query cannot be found.


Dim objCmd As New ADODB.Command

Dim objPrm As ADODB.Parameter


objCmd.ActiveConnection = CurrentProject.Connection

objCmd.CommandType = adCmdStoredProc

objCmd.CommandText = "nextval"


Set objPrm = objCmd.CreateParameter("@name", adBSTR, adParamInput, ,

objCmd.parameters.Append objPrm


Set sequenceNumber = objCmd.Execute

seqNum = sequenceNumber!nextval


Can anbody help me with this?




Oliver Gosling



pgsql-odbc by date

Next:From: Eric EDate: 2004-12-06 15:33:54
Subject: Re: calling nextval function
Previous:From: Dave PageDate: 2004-12-03 08:56:04
Subject: Re: can't relink from MS access after dropping field

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group