Re: Bug in SQLRowCount ?

From: Johann Letzel <j(dot)letzel(at)t-online(dot)de>
To: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
Cc: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: Bug in SQLRowCount ?
Date: 2013-01-22 06:02:39
Message-ID: 50FE2B7F.7040202@t-online.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-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
>

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message j.letzel@t-online.de 2013-01-22 12:58:23 SQL_CONCUR_LOCK not supported ?
Previous Message Sandeep Thakkar 2013-01-21 11:28:57 Error connecting psqlODBC to PostgreSQL