Hi, First, the index of the bind variable (second parameter to sqlite3_bind_xxxx, your 'i') must begin with 1, and not 0, see http://www.sqlite.org/capi3ref.html#sqlite3_bind_blob
Sqlite does not use strong typing, which means that you can put any data into any column. However INTERGER PRIMARY KEY is an exception and must be an integer. Therefore, the error most probably comes from your 'Id' - column. Martin A.J.Millan wrote: > Hi list: > > Supposing a dBase without constraints (some like this but not limited to > it): > > CREATE TABLE tbl (Id INTEGER PRIMARY KEY, Nm INTEGER, Cl INTEGER, Dc REAL, > Dm REAL, St INTEGER); > > A query to poblate: > > "INSERT INTO tbl (id,nm,cl,dc,dm,st) VALUES (?,?,?,?,?,?)" > > Then six binds (i = 0 to 5): > > sqlite3_bind_xxx (pStmt, i, ...); > > and a "step": resp = sqlite3_step(pStmt);. > > Then, if resp == SQLITE_MISMATCH (Data type mismatch) > > Do is there some way to know the index (i) of the offending bind? > > By the way: I'm trying to make a general function to import (duplicate) data > from an attached table. > > Thanks in advance. > > A.J.Millan > > _______________________________________________ > 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