How to get actual number of rows affected with parameter array - Mailing list pgsql-odbc

From Haribabu Kommi
Subject How to get actual number of rows affected with parameter array
Date
Msg-id CAJrrPGcnwh6OzVCfBh8t6Eb4kaM4JYNqhWFhwfM9rvmiOvuxdQ@mail.gmail.com
Whole thread Raw
List pgsql-odbc
I am having a problem in getting actual number of rows affected when
the test application uses parameter array.

SQLCHAR * strSQL   = "DELETE FROM TSTBL1 WHERE INTCLMN2 = ?";
SQLINTEGER   pPersonIDs2 [2] = {30,10};

The above SQL statement with passed values affects 5 rows in a table.

retcode = SQLGetInfo(hdbc, SQL_PARAM_ARRAY_ROW_COUNTS, ¶m_count, 0, NULL);

The SQLGetInfo function returned SQL_PARC_BATCH as output, that means
it produces individual row counts.

retcode = SQLSetStmtAttr (hstmt, SQL_ATTR_PARAMS_PROCESSED_PTR,
&ParamsProcessed, 0);

The above statement returns the ParamsProcessed value as 2, as we have processed
two values.

retcode=SQLRowCount(hstmt, &RowCount);

The above statement returns the number of rows affected by the
statements with the
first parameter value only. That is value - 3.

I want the rows affected with the second parameter also. Is there any way to get
individual row counts?

Attached test.sql and delcnt.c test files that reproduce this problem.

Regards,
Hari Babu
Fujitsu Australia

Attachment

pgsql-odbc by date:

Previous
From: Christian Ullrich
Date:
Subject: Re: Bugs related to getting @@identity
Next
From: Haribabu Kommi
Date:
Subject: Error in calling a function with protocol 7.4