On 16 Jan 2014, at 3:46pm, Mcdonald, Brett <[email protected]> wrote:
> For our product, it's ideal that by default all db connections are opened > using SQLITE_OPEN_READONLY, at runtime use sqlite3_stmt_readonly() and > promote an existing db connection to read-write accordingly. Sorry, but this is not possible. The permissions you ask for when you open the file can be used at the operating system and file system levels. However, you can keep a connection safe until you actually want to write. You can use this PRAGMA: <http://www.sqlite.org/pragma.html#pragma_query_only> So you would open the connection as r/w but immediately execute PRAGMA query_only = YES and leave it that way until (unless) you actually needed to write. Simon. _______________________________________________ sqlite-users mailing list [email protected] http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

