Eugene Wee wrote:

But I'm still curious as to the delimiter thing, hope someone can clarify.
Oh, and also, does sqlite3_prepare() ask for the length of the statement string in bytes including the null terminator, or excluding it? Or is it safe to use -1 most of the time?

The delimiter thing isn't relevant with the prepared statements interface. The bound parameter is known to be a data item, not an SQL delimiter like the SQL quote character (').


You should be safe using strlen rather than subtracting 1 from it. strlen() returns the number of characters in a string, not including the terminating NULL. That's what sqlite3_prepare() is expecting.

I'm glad that my article was of some use to you in using the sqlite_prepare() interface.

Clay Dowling
--
http://www.lazarusid.com/notes/
Lazarus Notes
Articles and Commentary on Web Development

Reply via email to