Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8npX-0004Ai-0b for pgsql-odbc@arkaria.postgresql.org; Thu, 30 Jan 2014 09:22:39 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W8npV-0004eu-Pw for pgsql-odbc@arkaria.postgresql.org; Thu, 30 Jan 2014 09:22:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8npU-0004en-PP for pgsql-odbc@postgresql.org; Thu, 30 Jan 2014 09:22:36 +0000 Received: from nm34-vm1.bullet.mail.bf1.yahoo.com ([72.30.239.73]) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8npL-00024L-Ov for pgsql-odbc@postgresql.org; Thu, 30 Jan 2014 09:22:36 +0000 Received: from [98.139.212.152] by nm34.bullet.mail.bf1.yahoo.com with NNFMP; 30 Jan 2014 09:22:25 -0000 Received: from [98.139.212.217] by tm9.bullet.mail.bf1.yahoo.com with NNFMP; 30 Jan 2014 09:22:25 -0000 Received: from [127.0.0.1] by omp1026.mail.bf1.yahoo.com with NNFMP; 30 Jan 2014 09:22:25 -0000 X-Yahoo-Newman-Property: ymail-5 X-Yahoo-Newman-Id: 585240.25293.bm@omp1026.mail.bf1.yahoo.com Received: (qmail 43548 invoked by uid 60001); 30 Jan 2014 09:22:25 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1391073745; bh=bI0Wegv81AoRP+vzfggaLfzhuG3YSEStFgk/I0GhA0s=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=oB8NmyBsGd3ap6ISD/8bDpeYMNP9EqwSAek04xgBDfRcYw1YiHZgrffwuTYIOKcSvwm3/j0FIAxwpY5uWLDUUdjqNhF67EVvOIWmSRO6rlUBZ1vLRA62toLZigrZIIIRERyBgS/IkhqhbQSXoav38uv7dRsGAXg31Aui2bh9rOg= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=Udw91rWgSujdVzm4nYfXdL+hlH6Giw5FTEm6fcG8hYj8aZsOieeSdqisQA0UtVOAaXIrsyVKSUFlmUb64Wf8ruIympe6uJaQGw4U5kGUWvaUyScXSlULYEXSstVv3SPYJTIY4iMgVZM9veNKyghJNVEZi/joCt/M+ctHKf6syiE=; X-YMail-OSG: 4LilQIUVM1ldAWbpo3n997j7XTJ.EAsW_kTK6JpH4cU.WVC U3mJV8BWh58BXLUxbdLHreAyRAR3aZpfstxPULoZK0PpP7LgdQo2kip28rN8 Dd6DLFql8LuZAqW82nDPp5X0xAyv5BSXnPavJRqDfFM543KiAbdeZP2Cs0.n RtEL63sAPKPDowBDRdJvzJiFBdUh8b6bXqxMmxSBskjejL3lkcGJ5iX62VhL Ipomdu.gJTtxf_LMhmHPtJ4H6jUN0W.4vkQC.FrxFFEySShyGZyZYb5IIiCM OR7BAXAh1Qkk5xYOLBVe6ScxCU9uAPL0zYYXYrjYghXqRQQSTmjSbzMDXqZ1 5b0Peijfh8Ze0HokAXHgoe98Z9.ED71jbrnnNWNg440eDMO1D8qAgVa5KYmo VejtOilSFikf6YzYbIWDBxrH.x2SbkH8Exokv8uG17p1hYQwqfwUX9YZIXYb 7WWh8fAYrq5kLCNV8ALciKbORvYGB5XltF.dN_d1aHghgDiNbJUbqkJEZC6Y z5Q8Y4EubRD77yUPuWqBOFiR6Q_Yx7w-- Received: from [82.76.85.138] by web142606.mail.bf1.yahoo.com via HTTP; Thu, 30 Jan 2014 01:22:25 PST X-Rocket-MIMEInfo: 002.001, CgpUaGFuayB5b3UgTWFydGluIGZvciB5b3VyIHJlcGx5LgpBcHBhcmVudGx5IHdlIGRpZCBoYXZlIGEgYnVnIGluIG91ciBjb2RlIHRoYXQgd2FzIGNhdXNpbmcgdGhlIGFjY2VzcyB2aW9sYXRpb24uIEV2ZXJ5dGhpbmcgaXMgd29ya2luZyByaWdodCBub3cuCgoKT24gV2VkbmVzZGF5LCBKYW51YXJ5IDI5LCAyMDE0IDExOjA2IFBNLCBNYXJ0aW4gSi4gRXZhbnMgPGJvaGljYUBudGx3b3JsZC5jb20.IHdyb3RlOgogCk9uIDI5LzAxLzIwMTQgMTQ6NDgsIEFuZHJlaSBHaGVvcmdoZSB3cm90ZToKCj4gSGVsbG8BMAEBAQE- X-Mailer: YahooMailWebService/0.8.173.622 References: <1391006929.86845.YahooMailNeo@web142602.mail.bf1.yahoo.com> <52E96D18.5040005@ntlworld.com> Message-ID: <1391073745.10097.YahooMailNeo@web142606.mail.bf1.yahoo.com> Date: Thu, 30 Jan 2014 01:22:25 -0800 (PST) From: Andrei Gheorghe Reply-To: Andrei Gheorghe Subject: Re: Retrieving output bind parameters not working To: "Martin J. Evans" , "pgsql-odbc@postgresql.org" In-Reply-To: <52E96D18.5040005@ntlworld.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="562241088-1197138799-1391073745=:10097" X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org --562241088-1197138799-1391073745=:10097 Content-Type: text/plain; charset=us-ascii Thank you Martin for your reply. Apparently we did have a bug in our code that was causing the access violation. Everything is working right now. On Wednesday, January 29, 2014 11:06 PM, Martin J. Evans wrote: On 29/01/2014 14:48, Andrei Gheorghe wrote: > Hello, > > I'm trying to call a procedure that takes two OUT parameters and one IN > parameter > but the buffers for the two OUT parameters I've called SQLBindParameter on > aren't filled after executing "SELECT procedure(?, ?, ?)". The procedure > does > return them as "(value1, value2)". > > Also, when I try to execute "{CALL procedure (?,?,?)}", I get an access > violation > in psqlodbc35w.dll. > The code I'm trying right now was used with other ODBC drivers and it > was working. > > Am I doing something wrong or does Postgres deal differently with OUT > parameters? > > Thank you I don't use the Postgres ODBC driver for real and I only hang about on this list as I look after Perl DBD::ODBC. In some ODBC drivers output parameters passed to procedures are only available after SQLMoreResults returns negatively i.e., your procedure must finish before the output bound parameters are available and certainly in MS SQL Server unless nocount is on, any insert/update/delete requires SQLMoreResults to be called repeatedly to walk through the results in the procedure. I've no idea if this is the reason for your first problem but thought it worth mentioning. Martin -- Martin J. Evans Wetherby, UK -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc --562241088-1197138799-1391073745=:10097 Content-Type: text/html; charset=us-ascii

Thank you Martin for your reply.
Apparently we did have a bug in our code that was causing the access violation. Everything is working right now.

On Wednesday, January 29, 2014 11:06 PM, Martin J. Evans <bohica@ntlworld.com> wrote:
On 29/01/2014 14:48, Andrei Gheorghe wrote:

> Hello,
>
> I'm trying to call a procedure that takes two OUT parameters and one IN
> parameter
> but the buffers for the two OUT parameters I've called SQLBindParameter on
> aren't filled after executing "SELECT procedure(?, ?, ?)". The procedure
> does
> return them as "(value1, value2)".
>
> Also, when I try to execute "{CALL procedure (?,?,?)}", I get an access
> violation
> in psqlodbc35w.dll.
> The code I'm trying right now was used with other ODBC drivers and it
> was working.
>
> Am I doing something wrong or does Postgres deal differently with OUT
> parameters?
>
> Thank you


I don't use the Postgres ODBC driver for real and I only hang about on
this list as I look after Perl DBD::ODBC.

In some ODBC drivers output parameters passed to procedures are only
available after SQLMoreResults returns negatively i.e., your procedure
must finish before the output bound parameters are available and
certainly in MS SQL Server unless nocount is on, any
insert/update/delete requires SQLMoreResults to be called repeatedly to
walk through the results in the procedure.

I've no idea if this is the reason for your first problem but thought it
worth mentioning.

Martin
--
Martin J. Evans
Wetherby, UK


--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



--562241088-1197138799-1391073745=:10097--