"Sherief N. Farouk" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > That will make this case legal. What's the general behavior though? > Is it not guaranteed to be consumed during the call to bind_blob? In > other words, without providing SQLITE_TRANSIENT, can I get into > trouble with this?
SQLITE_TRANSIENT does precisely that - it tells SQLite to "consume" the data during the call to sqlite3_bind_blob (by making its own copy and managing it itself). By not using SQLITE_TRANSIENT, you avoid an extra copy, but you promise SQLite that the data will still be around by the time it needs to be written to disk (e.g. when the surrounding transaction is committed). You can use SQLITE_STATIC - then you will have to keep the data alive at least until the transaction is committed and the statement is reset. Otherwise, you can provide a callback function, which will be called when SQLite no longer needs the data. Igor Tandetnik _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

