Wout Mertens wrote: > I am using the user_version pragma for implementing an event-handling > database. I'd like to prepare the statement to update it, e.g. `PRAGMA > user_version = ?`. > > However, sqlite3 won't let me do that, so I just run the text query every > time with the number embedded.
<https://www.sqlite.org/pragma.html> says: | Some pragmas take effect during the SQL compilation stage, not the | execution stage. This means if using the C-language sqlite3_prepare(), | sqlite3_step(), sqlite3_finalize() API (or similar in a wrapper | interface), the pragma may run during the sqlite3_prepare() call, not | during the sqlite3_step() call as normal SQL statements do. Or the | pragma might run during sqlite3_step() just like normal SQL statements. | Whether or not the pragma runs during sqlite3_prepare() or | sqlite3_step() depends on the pragma and on the specific release of | SQLite. This implies that parameters are not available when some pragmas are executed. Regards, Clemens _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users