Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8cKI-00020U-Cl for pgsql-odbc@arkaria.postgresql.org; Wed, 29 Jan 2014 21:05:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1W8cKH-0004ct-42 for pgsql-odbc@arkaria.postgresql.org; Wed, 29 Jan 2014 21:05:37 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8cKF-0004ck-70 for pgsql-odbc@postgresql.org; Wed, 29 Jan 2014 21:05:35 +0000 Received: from know-smtprelay-omc-11.server.virginmedia.net ([80.0.253.75]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1W8cKB-0004yk-Qa for pgsql-odbc@postgresql.org; Wed, 29 Jan 2014 21:05:34 +0000 Received: from [192.168.5.21] ([82.4.97.129]) by know-smtprelay-11-imp with bizsmtp id Kx5V1n01S2nV9ii01x5VFn; Wed, 29 Jan 2014 21:05:29 +0000 X-Originating-IP: [82.4.97.129] X-Spam: 0 X-Authority: v=2.1 cv=Z/xiHRhA c=1 sm=1 tr=0 a=miiCmEN4VBzEUOFGs+MFkw==:117 a=miiCmEN4VBzEUOFGs+MFkw==:17 a=1Hn6g5MNOI0A:10 a=Z3BPzDdtjWwA:10 a=uObrxnre4hsA:10 a=8nJEP1OIZ-IA:10 a=NLZqzBF-AAAA:8 a=05Ij33o2nb0A:10 a=C3XRBKuvzMjDMVouNSAA:9 a=wPNLvfGTeEIA:10 Message-ID: <52E96D18.5040005@ntlworld.com> Date: Wed, 29 Jan 2014 21:05:28 +0000 From: "Martin J. Evans" Organization: at home User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: Retrieving output bind parameters not working References: <1391006929.86845.YahooMailNeo@web142602.mail.bf1.yahoo.com> In-Reply-To: <1391006929.86845.YahooMailNeo@web142602.mail.bf1.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -0.5 (/) 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 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