From: Johann Letzel <j.letzel@t-online.de>
To: Heikki Linnakangas <hlinnakangas@vmware.com>
Cc: Hiroshi Inoue <inoue@tpf.co.jp>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Bug in SQLRowCount ?
Date: Tue, 22 Jan 2013 07:02:39 +0100
Message-ID: <50FE2B7F.7040202@t-online.de> (raw)
In-Reply-To: <50F82EC5.60701@vmware.com>
References: <1TvloP-15Bhtg0@fwd04.aul.t-online.de>
<50F7F7D4.40307@tpf.co.jp>
<d644f2b8-47fb-49ba-aafe-27eb1be027c2@email.android.com>
<50F82EC5.60701@vmware.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
Hi !
A big thanks for the tips :)
I solved it now by the use of SQL_ATTR_PARAMS_PROCESSED_PTR and
SQL_ATTR_PARAM_STATUS_PTR.
By the way: MSSQL also returns SQL_PARC_BATCH ;)
Regards
Johann
Am 17.01.2013 18:03, schrieb Heikki Linnakangas:
> On 17.01.2013 16:05, Johann Letzel wrote:
>> But according to the ODBC API SQLRowCount should retrieve the number
>> of affected rows by the statement.
>>
>> Why does PostgreSQL gives a 1 and MSSQL the number of inserted/updated
>> rows ?
>
> According to this:
> http://msdn.microsoft.com/en-us/library/windows/desktop/ms711818%28v=vs.85%29.aspx,
> both behaviors are permitted. When the driver returns SQL_PARC_BATCH,
> when you call SQLGetInfo(conn, SQL_PARAM_ARRAY_ROW_COUNTS, ... ), the
> driver returns a separate row count for each parameter (PostgreSQL).
> When it returns SQL_PARC_NO_BATCH, it returns a single row count that's
> the sum of all parameters (MSSQL). In a portable application, you need
> to call SQLGetInfo, and deal with both behaviors.
>
> - Heikki
>
--
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: j.letzel@t-online.de, hlinnakangas@vmware.com, inoue@tpf.co.jp
Subject: Re: Bug in SQLRowCount ?
In-Reply-To: <50FE2B7F.7040202@t-online.de>
References: <1TvloP-15Bhtg0@fwd04.aul.t-online.de> <50F7F7D4.40307@tpf.co.jp> <d644f2b8-47fb-49ba-aafe-27eb1be027c2@email.android.com> <50F82EC5.60701@vmware.com> <50FE2B7F.7040202@t-online.de>
* 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