I know that I can open several connections to the sqlite database in memory using file:DB_NAME?mode=memory&cache=sharedin sqlite3_open_v2().
I open 2 connections to the In-Memory database. One with flags SQLITE_OPEN_URI | SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE, and the other with SQLITE_OPEN_READONLY | SQLITE_OPEN_URI.
The problem is that sqlite allows me to modify the database, even if the connection is read-only.
Can I establish a read-only connection? Do I have to write my own VFS to execute it?
source
share