How to get actual number of rows affected with parameter array

Поиск
Список
Период
Сортировка
От Haribabu Kommi
Тема How to get actual number of rows affected with parameter array
Дата
Msg-id CAJrrPGcnwh6OzVCfBh8t6Eb4kaM4JYNqhWFhwfM9rvmiOvuxdQ@mail.gmail.com
обсуждение исходный текст
Список 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

Вложения

В списке pgsql-odbc по дате отправления:

Предыдущее
От: Christian Ullrich
Дата:
Сообщение: Re: Bugs related to getting @@identity
Следующее
От: Haribabu Kommi
Дата:
Сообщение: Error in calling a function with protocol 7.4