Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id AAB329FB8C0 for ; Tue, 10 Jul 2007 18:59:01 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 85253-10 for ; Tue, 10 Jul 2007 18:58:59 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.227]) by postgresql.org (Postfix) with ESMTP id 58ECC9FB5A8 for ; Tue, 10 Jul 2007 18:58:58 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id h29so1311934wxd for ; Tue, 10 Jul 2007 14:58:57 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=AYEKDXEQB/kMCXas0DTEmgpgH5fkGWuvGfHsxZk5wfyBaUToMq8mjxG0SG7Hui5yG3PxJ74kjymozvIssg9+ncqYz6m9giZLHRtPzb94JtEiGWYb5qCqYmxdH5+EykKNCsD0+Jcm4uwDUHZVB0jtzQ/kC90+QhDuCiKGDVKjJCg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=qMlsJgMZpXz6mRSv4TwyLOvJyIRoEUbzuvT/cgUGS8wkl4OAcDRTV9F224Ja/sGREXi7cqnL2Gm+gXlTf/vhZsboMRBLk+p8SRr4+Ua3R93vm6Oboz/gNH8Sz1pEsr++R1w1AT4Rqb2zq1JtLgU1SjTjKMVk4f8OW/nKobhRSOQ= Received: by 10.70.48.15 with SMTP id v15mr8403269wxv.1184104737218; Tue, 10 Jul 2007 14:58:57 -0700 (PDT) Received: from ?192.168.130.126? ( [69.17.59.217]) by mx.google.com with ESMTP id h9sm10122968wxd.2007.07.10.14.58.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 10 Jul 2007 14:58:55 -0700 (PDT) Message-ID: <4694011E.5050309@gmail.com> Date: Tue, 10 Jul 2007 17:58:54 -0400 From: Eric E User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Problem getting sequences under 8.02.03.00 driver References: <4692C515.1050509@gmail.com> <469382FC.6020707@gmx.net> In-Reply-To: <469382FC.6020707@gmx.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/6 X-Sequence-Number: 9061 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