Jay:

You are abolutely rigth.

All my problem would be avoided if I do a error check in each individual 
bind. In fact the problem was a SQLITE_RANGE error.

Sure that some days is best go to the cinema when the mind is closed.

A.J. Millan

----- Original Message ----- 
From: "Jay A. Kreibich" <j...@kreibi.ch>
To: "General Discussion of SQLite Database" <sqlite-users@sqlite.org>
Sent: Monday, November 16, 2009 4:54 PM
Subject: Re: [sqlite] Fine-grainy error report needed


> On Mon, Nov 16, 2009 at 11:32:59AM +0100, A.J.Millan scratched on the 
> wall:
>> Martin:
>>
>> Thanks for the imput.  In fact, afther some years using SQLite I'v spent
>> almos a weekend because don't remember that the index in the
>> sqlite_column_xxx(sqlite3_stmt*,  iCol ) where I read the data from the
>> source table, "the leftmost column of the result set has the index 0", 
>> and
>> in the bind sentence,  "The leftmost SQL parameter has an index of 1"  -I 
>> do
>> both in the same loop-.
>
>> Any way, the question remains, and the method proposed by Owen perhaps is
>> good for debug, but not as a standard method.
>
>  Try checking the return codes from sqlite3_bind_xxx().  When you
>  attempted to bind something to parameter zero, the bind should have
>  returned SQLITE_RANGE.  Error codes only work if you check them.
>
>  Otherwise, the other answers are correct.  A quick scan of the code
>  makes me thing the only column capable of returning SQLITE_MISMATCH
>  is a ROWID or INTEGER PRIMARY KEY alias, and there can only be one of
>  those per table, and there can only be one table per INSERT.
>
>   -j
>
> -- 
> Jay A. Kreibich < J A Y  @  K R E I B I.C H >
>
> "Our opponent is an alien starship packed with atomic bombs.  We have
> a protractor."   "I'll go home and see if I can scrounge up a ruler
> and a piece of string."  --from Anathem by Neal Stephenson
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to