On Tue, Mar 01, 2011 at 05:13:00PM +0100, [email protected] scratched on the wall: > > Your examples suggest that actually sqlite3-bind_text "is not > > accepting std::string", not sqlite3_prepare_v2. But how exactly it > > "doesn't accept"? You pass SQLITE_STATIC as 5th parameter there; are you > > sure > > you don't destroy or change your strings before statement is executed? > > Correct, it is sqlite3-bind_text() with the problem, as you can see I'm not > changing the values, they are declared just before use.
If you pass them as SQLITE_STATIC, the "use" of those pointers continues after the bind call. The values must remain in-scope and valid until the statement is completely finished executing, reset, or finalized. I'm also curious why you're binding text values. It seems like integers would be more appropriate. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

