Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 9AFE39FB54B for ; Mon, 9 Jul 2007 20:30:39 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 32401-09 for ; Mon, 9 Jul 2007 20:30:29 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.225]) by postgresql.org (Postfix) with ESMTP id BE6399FB46A for ; Mon, 9 Jul 2007 20:30:33 -0300 (ADT) Received: by wx-out-0506.google.com with SMTP id h29so988497wxd for ; Mon, 09 Jul 2007 16:30:32 -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:content-type:content-transfer-encoding; b=nQYkTgb25rqrrJ14dpopCNOl2BJaQ3cKLqOU04cJWKWh1lD2v1E6fA6Yh0tZKGh3rOa62VPGm86X1Rljmn4yKnrkU+aUi/InprCyRCL1m3GJxwy+aeY9LnzSYZJHC7scFYRuNubLOyI7GMnS4In9quwG3b6uYMP+dRWrHao88gQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=o+djWIKaD0nYiTe5FJQh8NEOcDlpv2qpIlELlyEVhZLva1PxDNCQtLocEAWGo5EhSrUfJQBRWU8yL2J3Ay3ADgpIzUHMNF2ybh0SQd3SamjOQjNS433+pEtcndieBlA9fzI7SBoubu1sEoDYlGgTYCWxAOiDvmiABaK68ahfuxY= Received: by 10.70.49.1 with SMTP id w1mr6637906wxw.1184023832362; Mon, 09 Jul 2007 16:30:32 -0700 (PDT) Received: from ?192.168.130.126? ( [69.17.59.217]) by mx.google.com with ESMTP id i18sm13201187wxd.2007.07.09.16.30.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 09 Jul 2007 16:30:31 -0700 (PDT) Message-ID: <4692C515.1050509@gmail.com> Date: Mon, 09 Jul 2007 19:30:29 -0400 From: Eric E User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Problem getting sequences under 8.02.03.00 driver 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/3 X-Sequence-Number: 9058 Hi all, I installed the 8.02.03.00 driver during my installation of Postgres 8.2 onto my machine. After installation of that driver, the following code related to sequences would not work: Dim cnGetAutoGenID As ADODB.Connection ' Get a local handle to the single ADO connection Set cnGetAutoGenID = GetPgADOConnection Dim sSequenceName As String, sGetIDSQL As String sGetIDSQL = "SELECT nextval('""" & sSequenceName & """'::text) as seqval;" Dim rsSeqVal As New ADODB.Recordset Set rsSeqVal = cnGetAutoGenID.Execute(sGetIDSQL) ' Execute the SQL With rsSeqVal ' If there are now rows in this recordset, then there was an ' error getting the sequence value If .BOF Then GoTo Err_GetAutogenID Else GetAutogenID = .Fields("seqval") End If End With Where sSequenceName is holding the name of a sequence in the search_path visible to the connection. The problem is that the value returned from the ADODB Recordset is always 0. I can get a sequence perfectly well using pgAdmin, and logs of statements showed that the driver was in fact executing the SELECT nextval statement. I can also execute other SELECT statements just fine using the Connection and Recordset objects. For some reason, however, sequence values are always returned as 0. By rolling back to the 8.02.01.00 driver I was able to solve the problem, but I'm concerned that this bug will keep me from being able to move forward in versions of Postgres, and keep me from getting other fixes. Does anyone recognize this problem or know anything about the nature of it? Thanks, Eric