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 [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

