Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WLrO7-0000Bu-ML for pgsql-odbc@arkaria.postgresql.org; Fri, 07 Mar 2014 09:48:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WLrO7-0002tj-5b for pgsql-odbc@arkaria.postgresql.org; Fri, 07 Mar 2014 09:48:19 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WLrO6-0002sZ-4s for pgsql-odbc@postgresql.org; Fri, 07 Mar 2014 09:48:18 +0000 Received: from mail.lurcherlink.org ([217.34.199.121] helo=mail.lurcher.org) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WLrO3-0005wg-Ap for pgsql-odbc@postgresql.org; Fri, 07 Mar 2014 09:48:17 +0000 Received: from [172.20.0.153] (hul.easysoft.local [172.20.0.153]) by mail.lurcher.org (8.14.3/8.12.8) with ESMTP id s279mBK9001146 for ; Fri, 7 Mar 2014 09:48:11 GMT Message-ID: <531995DF.9010202@lurcher.org> Date: Fri, 07 Mar 2014 09:48:15 +0000 From: Nick Gorham User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: SQLFetchScroll with SQL_ATTR_ROWS_FETCHED_PTR closing statement. References: <1385453596.4529.206.camel@salti.rnd.ki.sw.ericsson.se> <5315E154.3080406@vmware.com> <1394125507.15011.18.camel@salti.rnd.ki.sw.ericsson.se> <53197EA7.6070700@tpf.co.jp> In-Reply-To: <53197EA7.6070700@tpf.co.jp> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sipserver.lurcher.org X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org 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 -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc