> D. Richard Hipp wrote: > It is safer and faster to use the sqlite3_bind_text() interface. > > First prepare your statement like this: > > INSERT INTO my_table(col1) VALUES(?1); > > Then run: > > sqlite3_bind_text(pStmt, 1, zYourString, -1, SQLITE_TRANSIENT); > > Then run your statement: > > sqlite3_step(pStmt); > > Further information: http://www.sqlite.org/c3ref/bind_blob.html
Brilliant, what a great API! But are there never quotes around the ?1, ?2, etc. even in SELECT statements? For example: SELECT * FROM table WHERE col1=?1 AND col2=?2; Is this correct or should there be '' around the ?1 or ?2 parameters? _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users