SQLite Forum

C api sqlite3_db_readonly returns -1
Login
No, the DB file can be wherever a writable file might reside. Also, you provided a code fragment, one which I made into a file that could be compiled and which needed a name so that the compiler could actually compile it. Those differences are not relevant to your problem, which I demarked with code comments.