On Wed, Jan 15, 2014 at 4:41 PM, Clemens Ladisch <clem...@ladisch.de> wrote:

> sqliteuser0000 wrote:
> > sqlite3_bind_text(stmt, 1, qry.c_str(), -1, 0);
>
> The last parameter must not be zero.  For string::c_str(), you
> should use SQLITE_TRANSIENT.
>


Depending on the context, SQLITE_STATIC could be legally used, but only if
the string in question is guaranteed to survive (_unchanged_) for the life
of the statement.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Freedom is sloppy. But since tyranny's the only guaranteed byproduct of
those who insist on a perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to