Re: [sqlite] When to use SQLITE_STATIC and SQLITE_TRANSIENT?

2007-08-10 Thread Dan Kennedy
On Fri, 2007-08-10 at 11:28 +0200, Jef Driesen wrote: > When using sqlite3_bind_text() (or a similar function) with > SQLITE_STATIC, how long does the pointer have to remain valid? As long > as the sqlite3_stmt is not finalized? Pretty much. It has to be valid during all subsequent calls to

[sqlite] When to use SQLITE_STATIC and SQLITE_TRANSIENT?

2007-08-10 Thread Jef Driesen
When using sqlite3_bind_text() (or a similar function) with SQLITE_STATIC, how long does the pointer have to remain valid? As long as the sqlite3_stmt is not finalized? It is clear to me the following will cause no problem: sqlite3_bind_text (stmt, column, "some text", -1, SQLITE_STATIC);