SQLite Forum

C api sqlite3_db_readonly returns -1
You severely handicap those who might be willing and able to help you when you present "problematic" code which differs from the code for which you hope to resolve problems.  This is why I use phrasing such as "exact code" and Stephan clearly disfavors "a summary of it".