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

Re: Problem getting sequences under 8.02.03.00 driver

From: Eric E <whalesuit(at)gmail(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Problem getting sequences under 8.02.03.00 driver
Date: 2007-07-10 21:58:54
Message-ID: 4694011E.5050309@gmail.com (view raw or flat)
Thread:
Lists: pgsql-odbc
Andreas wrote:

Many thanks for the reply and the suggestions, Andreas.

> Maybe it's because you define the resulting type as text?

I double-checked and the cast to text is inside the function call, so 
the result should be coming back as an integer.  Also, the field in the 
recordset is set up as an integer.

> I've installed latest ODBC V8.0.2.04.01 and there a similar query works.
> 
>    Dim objRstADO As ADODB.Recordset
> 
>    Set objRstADO = objConnADO.Execute("SELECT nextval('" & 
> strSequenceName & "')", , adLockReadOnly)
>    debug.print Nz(objRstADO(0), 0)
I guess I'll try 8.02.04.01
> 
> Is the Login-role in the connectionstring the same as you use in pgAdmin?
> Perhaps - ok, not very likely - is your ADO connection just not allowed 
> to see the sequence.
I thought it might be something like that.
> Depending on your function's error handler there could be a hidden error 
> condition and the function delivers the default value for numeric types 
> = 0.
> 
Possible, though it seems like there's no error being returned by the 
ADODB connection - I'll check that, too.

Thanks again,

EE

In response to

pgsql-odbc by date

Next:From: Tom AllisonDate: 2007-07-11 10:24:35
Subject: Re: Duplicate Unique Key constraint error
Previous:From: Harpreet DhaliwalDate: 2007-07-10 19:33:34
Subject: Re: Duplicate Unique Key constraint error

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