calling nextval function

Поиск
Список
Период
Сортировка
От Gosling, Oliver
Тема calling nextval function
Дата
Msg-id 7F332A8009EE5D4CB62C87717A3498A10A3A2D9F@exchange-be1.lancs.ac.uk
обсуждение исходный текст
Ответы Re: calling nextval function  (Eric E <whalesuit@bonbon.net>)
Список 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, , "bed_id_seq")

objCmd.parameters.Append objPrm

    

Set sequenceNumber = objCmd.Execute

seqNum = sequenceNumber!nextval

 

Can anbody help me with this?

 

Regards,

 

Oliver Gosling

 

В списке pgsql-odbc по дате отправления:

Предыдущее
От: "Dave Page"
Дата:
Сообщение: Re: can't relink from MS access after dropping field
Следующее
От: Eric E
Дата:
Сообщение: Re: calling nextval function