flakpit wrote:
> 
> Peter Holmes-4 wrote:
>> 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);
>>
> 
> so ?,? represent columns to be filled in right?

Yes.

> and stmt,0 is column 0 and stmt,1 is column 1?

Yes, see http://www.sqlite.org/c3ref/bind_blob.html for details.

> and the  -1 is add to end of db?

No, the -1 means use strlen to find the length of the strings (i.e. up 
to first 0 character).

See, http://www.sqlite.org/c3ref/prepare.html for details on prepare and 
previous link for detail on bind_text.

HTH
Dennis Cote
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to