From: Martin J. Evans <bohica@ntlworld.com>
To: pgsql-odbc@postgresql.org
Subject: Re: Retrieving output bind parameters not working
Date: Wed, 29 Jan 2014 21:05:28 +0000
Message-ID: <52E96D18.5040005@ntlworld.com> (raw)
In-Reply-To: <1391006929.86845.YahooMailNeo@web142602.mail.bf1.yahoo.com>
References: <1391006929.86845.YahooMailNeo@web142602.mail.bf1.yahoo.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: bohica@ntlworld.com
Subject: Re: Retrieving output bind parameters not working
In-Reply-To: <52E96D18.5040005@ntlworld.com>
References: <1391006929.86845.YahooMailNeo@web142602.mail.bf1.yahoo.com> <52E96D18.5040005@ntlworld.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox