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 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
> 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 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

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

[sqlite] Problem with sqlite3_bind_int

2017-01-20 Thread Bart Smissaert
Using the latest SQLite3 on Windows, accessed from an ActiveX dll. Come across a strange bug that I just can't unravel: I have a 2 dimensional VB6 variant array that I am moving to a SQLite table. This variant array is obtained from a .csv text file. The first column of this variant array holds

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] [OT] mySQL ORDER BY clause in Views

2017-01-20 Thread Peter Haworth
Thanks to all for the input. To clarify, yes the ORDER BY clause is in the view definition and the SELECT statement that addresses the view does not have an ORDER BY clause. I think the penny has finally dropped for me on this issue. The key was the description by a responder that views are not