pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nick Gorham <nick@lurcher.org>
To: pgsql-odbc@postgresql.org
Subject: Re: SQLFetchScroll with SQL_ATTR_ROWS_FETCHED_PTR closing statement.
Date: Fri, 07 Mar 2014 09:48:15 +0000
Message-ID: <531995DF.9010202@lurcher.org> (raw)
In-Reply-To: <53197EA7.6070700@tpf.co.jp>
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>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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




-- 
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc



view thread (8+ messages)  latest in thread

Message-ID: <531995DF.9010202@lurcher.org>
Permalink:  ../531995DF.9010202@lurcher.org/
Also on:    postgresql.org/message-id/531995DF.9010202@lurcher.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: nick@lurcher.org
  Subject: Re: SQLFetchScroll with SQL_ATTR_ROWS_FETCHED_PTR closing statement.
  In-Reply-To: <531995DF.9010202@lurcher.org>
  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> <531995DF.9010202@lurcher.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox