Re: [sqlite] Problem with sqlite3_bind_int

2017-01-20 Thread Bart Smissaert
> What is this btLBAdd that you have in one place but not the other? To avoid confusion I took the correction factor out of the first code line, but not the second. My fault. This correction factor is to accommodate both 0-based and 1-based arrays (VB6 can do that). This is not the problem. I

Re: [sqlite] Problem with sqlite3_bind_int

2017-01-20 Thread Igor Tandetnik
On 1/20/2017 6:15 PM, Bart Smissaert wrote: Good idea, I have checked for this but will double check again. The problem arises already with the very first element of the variant array and my log shows the problem: logged before the bind: vArray(0, 0): 1 Wait, you are indexing from 0?

Re: [sqlite] Problem with sqlite3_bind_int

2017-01-20 Thread Bart Smissaert
Good idea, I have checked for this but will double check again. The problem arises already with the very first element of the variant array and my log shows the problem: logged before the bind: vArray(0, 0): 1 logged after the first row has all the values bound: bound value: -1 There are no

Re: [sqlite] Problem with sqlite3_bind_int

2017-01-20 Thread Igor Tandetnik
On 1/20/2017 4:55 PM, Bart Smissaert wrote: These integer values are then bound like this: sqlite3_bind_int lStatementHandle, ByVal c, ByVal CLng(vArray(r, c)) My guess: some CSV fields contain non-digit characters (perhaps invisible control characters), and so numeric coersion fails on

Re: [sqlite] Problem with sqlite3_bind_int

2017-01-20 Thread Bart Smissaert
> or storing the right values but recalling them incorrectly I am 100% sure they are recalled correctly but bound wrongly. Verified this in various different ways. RBS On Fri, Jan 20, 2017 at 9:59 PM, Simon Slavin wrote: > > On 20 Jan 2017, at 9:55pm, Bart Smissaert

Re: [sqlite] Problem with sqlite3_bind_int

2017-01-20 Thread Simon Slavin
On 20 Jan 2017, at 9:55pm, Bart Smissaert wrote: > The first column of this variant array holds integer values and apparently > randomly > the bound values appear wrongly as -1, whereas it should be 1 or whatever > else integer > value. If you’re not sure about this