Yep.  Works great!  For example:

sqlite3_prepare_v2(db,"INSERT INTO ans VALUES (?,?);",-1,stmt,NULL);
sqlite3_bind_text(stmt,0,"Peter's",-1,SQLITE_STATIC);
sqlite3_bind_text(stmt,1,"Reply",-1,SQLITE_STATIC);
sqlite3_step(stmt);
sqlite3_reset(stmt);

flakpit wrote:
> I've been escaping single quote characters in all my text fields and using
> the sqlite_execute function to put the data into the table. But is it
> possible to use the prepare/bind commands to enter data so that I don't have
> to do this?
> 
> I've been using the column_text type to get back a block of text and it's
> being truncated at the first CR/LF pair in the text block and I can't help
> thinking that I could have avoided this somehow by entering it with a
> prepared statement.
> 
> Or am I completely wrong?
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to