James Hartley <jjhart...@gmail.com> wrote:
> The documentation speaks that multiple SQL statements can be passed to
> sqlite3_prepare_v2() which will only compile the first statement of the
> stream.  Upon return, pzTail points to the first character of the next SQL
> statement which has not been compiled.  From this, I assume that *pzTail
> will be set to NULL after compiling the stream's last statement?

I suspect it'll point to the terminating NUL character. In any case, it should 
be easy to figure out experimentally.

> Also when processing multiple SQL statements, does sqlite3_reset() need to
> be called before calling sqlite_prepare_v2() again using the last value of
> pzTail as the next SQL statement to compile?

No. The two sqlite_prepare_v2() calls and the two statement handles they 
produce are completely independent. It doesn't matter at all that the original 
strings from which they were compiled just happened to reside in the same 
char[] array.
-- 
Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to