"baxy77bax" <b...@hi.htnet.hr> wrote in message news:21581675.p...@talk.nabble.com > the problem is that i have this situation: > > /*global*/ > /*for sqlite */ > sqlite3 *db; > sqlite3_stmt* insert_stmt; > > /*finito sqlite*/ > > // function : > > Pr (VoidPtr ptr){ > > // 3 variables char a1, int a2, float a3->u, > > sqlite3_prepare(db, "insert into NRP(a1, a2, a3) values ("----what do > i write here to get values from a1,a2,a3->u into my table-----");",-1, > &insert_stmt, NULL);
You write "insert into NRP(a1, a2, a3) values (?, ?, ?);" Each question mark is one parameter, you need one for each value being inserted. For more details, see http://sqlite.org/c3ref/bind_blob.html > sqlite3_bind_int(insert_stmt, 1, 42); Given your column types, you do sqlite3_bind_text(insert_stmt, 1, "some text", -1, SQLITE_TRANSIENT); sqlite3_bind_int(insert_stmt, 2, 42); sqlite3_bind_double(insert_stmt, 3, 42.0); Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users