Re: Bug in SQLRowCount ?

From: Johann Letzel <j(dot)letzel(at)t-online(dot)de>
To: Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Bug in SQLRowCount ?
Date: 2013-01-17 14:05:41
Message-ID: d644f2b8-47fb-49ba-aafe-27eb1be027c2@email.android.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi !

Tanks for the reply.

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 ?

Regards

Johann

Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp> schrieb:

>(2013/01/17 18:31), j(dot)letzel(at)t-online(dot)de wrote:
>> Hello !
>>
>> I maintain a backend in a commercial context. The backend provides
>> access to MS SQLServer (via ODBC) and Oracle (via OCI). Now I want to
>> make it ready for PostgreSQL via ODBC.
>>
>> For performance reasons we use bulk inserts/updates.
>>
>> This is done in this manner:
>>
>> SQLAllocStmt
>>
>> SQLPrepare // insert into kfztest.KP values (?,?,...,?)
>>
>> SQBindParameter // for each column
>>
>> ...
>>
>> SQLSetStmtAttr // SQL_ATTR_PARAMSET_SIZE to 523
>>
>> SQLSetStmtAttr // SQL_ATTR_PARAM_STATUS_PTR to an array of
>SQLSMALLINT
>>
>> SQLSetStmtAttr // SQL_ATTR_PARAMS_PROCESSED_PTR to an SQLULEN
>variable
>>
>> SQLExecute // ends with SQL_SUCCESS
>>
>> SQLRowCount // delivers 1 !!!!
>
>The driver gives individual row counts for each parameter set.
>SQLGetInfo(.., SQL_PARAM_ARRAY_ROW_COUNTS) returns SQL_PARC_BATCH.
>
>regards,
>Hiroshi Inoue
>
>
>
>--
>Sent via pgsql-odbc mailing list (pgsql-odbc(at)postgresql(dot)org)
>To make changes to your subscription:
>http://www.postgresql.org/mailpref/pgsql-odbc

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Heikki Linnakangas 2013-01-17 17:03:01 Re: Bug in SQLRowCount ?
Previous Message Hiroshi Inoue 2013-01-17 13:08:36 Re: Bug in SQLRowCount ?