Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m18Nr-0008Tz-55 for pgsql-general@arkaria.postgresql.org; Wed, 07 Jul 2021 14:18:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m18No-0004jM-2P for pgsql-general@arkaria.postgresql.org; Wed, 07 Jul 2021 14:18:36 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m18Nn-0004jE-Nl for pgsql-general@lists.postgresql.org; Wed, 07 Jul 2021 14:18:35 +0000 Received: from mail-pj1-x1035.google.com ([2607:f8b0:4864:20::1035]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m18Ni-0003yy-D4 for pgsql-general@lists.postgresql.org; Wed, 07 Jul 2021 14:18:34 +0000 Received: by mail-pj1-x1035.google.com with SMTP id l11so1624446pji.5 for ; Wed, 07 Jul 2021 07:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=p8u03aoQ6QNqSYBSHHRvMzJ1ARelDl0RNeeebpCWItk=; b=YT3ocae39YehOBCfbepBZC3Dm+UwCM7H4sZDwzC4e7J5D+vvQ4ddxMvHn+EIsNSocI IzP0ZfZyXwtPGmGgvmFnsZr3ukpZxYHomTuMe2z19IQSNUkNR+vbqars6YGOesOU2/xK o5XrHt7+qPwSdCTWXzZlmlvkz7gkUEUsNVqZBqOb5PByNKjSo5Z706HT9nL5Djw87Obs DPO4jOJAyIQxQ516PleLOhej/YhEYMdKxHo+K4/k8OKLMUr1ErYYbhu5XGpZOXLBrr3l 6OCA2l5EB5b43FEMUKoXAdfaduQOR1M9clgzkXLjG89cKaqf3Ij9SjQ3d4DDWPU3+SIO nhEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=p8u03aoQ6QNqSYBSHHRvMzJ1ARelDl0RNeeebpCWItk=; b=NEdTeIWkAFuBeTwAB0EM4XZWqXSXhAINUwfmZk6hYlWiZ/36z0tmhGMHfWHUTJhEUU yfqYINR4cacxoWGBGmTYrW3thGzF95F1S+zqM5JCAiVHJu0gNEh6/qZR4ZdGzlqJmWRb 40QD056tjFfhxNeLukZt0c/qeys2pYbJhT9fRXWPXb45lJkmTUYn2Ob0hE3UQoYTDGEn a4P2CF2MmWj55AI25Amv+vj2Wd2sORtBLhUuWeNs0LaEnmXVhGZKDiV/YX9WQmC+fCSH jjqClL4/TDkDhWM86LoRprpZe/+3w/dtUu4m5rFVvIiR1EZwzrQ1BIbSs98ZdGZgIJN2 vO3w== X-Gm-Message-State: AOAM530d8DoBuYXZRpF3q48lkdWXq4GBvY2eEDpUZSAIl0NeB7c0/vqy 4LZYnpg9HQMCDgNLUnM2eoss8rUfbQE= X-Google-Smtp-Source: ABdhPJyF/h4t5t5Yew8xSt4+YW6rxOCRM877p5FTVMgHKhtYSv/AqY9s56jp7Av+x1xAngNT+JrZyQ== X-Received: by 2002:a17:90a:1109:: with SMTP id d9mr26431027pja.183.1625667508091; Wed, 07 Jul 2021 07:18:28 -0700 (PDT) Received: from [10.5.132.62] ([190.2.24.9]) by smtp.gmail.com with ESMTPSA id c24sm24080482pgj.11.2021.07.07.07.18.26 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Jul 2021 07:18:27 -0700 (PDT) Subject: Re: Does psqlodbc_10_03_0000-x86(32bit) support PostgreSQL 12.6 64bit? To: pgsql-general@lists.postgresql.org References: <5ff336b0.4ff4.17a808bf298.Coremail.gzhcoder@126.com> From: Diego Message-ID: Date: Wed, 7 Jul 2021 11:18:25 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <5ff336b0.4ff4.17a808bf298.Coremail.gzhcoder@126.com> Content-Type: text/plain; charset=gbk; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk hi, Try with a newer version of odbc driver, something like psqlodbc_12_02_0000 On 07/07/2021 07:38, ¹Ü¸m wrote: > > > > Created by: gzhcoder > Email address: gzhcoder@126.com > PostgreSQL version: 12.6 > Operating system: windows 10 > Description: > > I have a classic ASP Website on IIS. I change the ¡° Enable 32-bit > Applications ¡± to True (Set the IIS application pool to spawn in a 32-bit > mode). > The Website connect to PostgreSQL 9.4 64bit with > psqlodbc_10_03_0000-x86(32bit) and it works very well . > When I change the PostgreSQL 9.4 64bit to PostgreSQL 12.6 64bit . I get the > error below : > > Number: -2147217887 > Description: Multiple-step OLE DB operation generated errors. > > I found that the problem occurred in the third step: > Step 1. Starts a new transaction with the BeginTrans method. > Step 2. Creates an OraDynaset object from the specified SQL SELECT statement > SQL-A. > Step 3. Creates an OraDynaset object from the specified SQL SELECT statement > SQL-B. > Step 4. Ends the current transaction with the CommitTrans method. > > I made an sample asp as below: > psqlodbc.asp > -------------------------------------------------------------- start > ------------------------------------------------------------- > > <%@ language='VBScript' %> > <% > Option Explicit > > Function CreateDynaset(ArgSQL, ArgMod,cn ) > dim rs > Set rs = CreateObject("ADODB.Recordset") > > if ArgMod = 0 then > rs.Open ArgSQL, cn, 1, 3 > else > rs.Open ArgSQL, cn, 3, 2 > End if > > Set CreateDynaset = rs > End Function > %> > <% > Dim sConnection, objConn , objRS1, objRS2 ,sql > stop > sConnection ="DRIVER={PostgreSQL > Unicode};SERVER=999.999.999.999;database=XXXXXX;UID=XXXXXX;PASSWORD=XXXXXX;port=5432" > > Set objConn = Server.CreateObject("ADODB.Connection") > > objConn.Open(sConnection) > > 'DoStep1 > objConn.BeginTrans > > 'SQL-A > sql = "SELECT cola FROM odbctest.t_odbc_a " > On Error Resume Next > > 'DoStep2 > set objRS1 = CreateDynaset(sql, 8, objConn) > > If Err.Number <> 0 Then > WScript.Echo "Error in DoStep2: " & Err.Description > Err.Clear > End If > > If objRS1.EOF <> True Then > objRS1.Close > Set objRS1 = Nothing > End If > > objRS1.Close > Set objRS1 = Nothing > > 'SQL-B > sql="SELECT colb FROM odbctest.t_odbc_b" > > On Error Resume Next > > 'DoStep3 > set objRS2 = CreateDynaset(sql, 8, objConn) > > If Err.Number <> 0 Then > WScript.Echo "Error in DoStep3: " & Err.Description > Err.Clear > End If > > If objRS2.EOF <> True Then > objRS2.Close > Set objRS = Nothing > End If > > objRS2.Close > Set objRS2 = Nothing > > 'DoStep4 > objConn.CommitTrans > > objConn.Close > Set objConn = Nothing > %> > > psqlodbc test > > -------------------------------------------------------------- end > ------------------------------------------------------------- > > > Thanks for any help > > >