Re: SQLFetchScroll with SQL_ATTR_ROWS_FETCHED_PTR closing statement.

Поиск
Список
Период
Сортировка
От Nick Gorham
Тема Re: SQLFetchScroll with SQL_ATTR_ROWS_FETCHED_PTR closing statement.
Дата
Msg-id 531995DF.9010202@lurcher.org
обсуждение исходный текст
Ответ на Re: SQLFetchScroll with SQL_ATTR_ROWS_FETCHED_PTR closing statement.  ("Inoue, Hiroshi" <inoue@tpf.co.jp>)
Ответы Re: SQLFetchScroll with SQL_ATTR_ROWS_FETCHED_PTR closing statement.  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Список pgsql-odbc
On 07/03/14 08:09, Inoue, Hiroshi wrote:
> (2014/03/07 2:05), Przemyslaw Rzepecki wrote:
>> Hi,
>>
>> Thanks for the answer! I have compare my program with Yours didn't
>> noticed any logical difference. Then tried rerun the tests on two
>> different systems, any my tests ware passing on one but the errors ware
>> still present on the other.
>>
>> Tried to step by step eliminate all the differences and I believe its
>> the libodbcinst.so.2 vs libodbcinst.so.1 which cause the difference. It
>> works fine with unixodbc 1 but when I use a driver recompiled against
>> unixodbc 2 then the error happens.
>
> Functions used in lib(i)odbcinst are SQLGetPrivateProfileString()
> and SQLWritePrivateProfileString().
> Could you please take the Mylog output of your failure case
> by setting Debug=1 in your odbc.ini?
>
> regards,
> Hiroshi Inoue
>
>
Hi,

I hope you don't mind me posting to your list as a observer, but I
noticed the following in the original code

SQLINTEGER int_array[ARRAY_SIZE];

     /* Bind */
     rc = SQLBindCol(hstmt, 1, SQL_INTEGER, int_array, sizeof(SQLLEN),
ind_array);
     CHECK_STMT_RESULT(rc, "SQLBindCol failed", hstmt);

I would have thought

     /* Bind */
     rc = SQLBindCol(hstmt, 1, SQL_INTEGER, int_array,
sizeof(SQLINTEGER), ind_array);
     CHECK_STMT_RESULT(rc, "SQLBindCol failed", hstmt);

Was what it should have been. The driver will have written past the end
of int_array, and overwritten the handle (I guess).

--
Nick




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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Removing support for < 7.4 servers
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: SQLFetchScroll with SQL_ATTR_ROWS_FETCHED_PTR closing statement.