SQLite Forum

sqlite opens a database file in R/W mode, even if the file is read-only
Login
Using Windows, with the database file (./db/test2.db)  having it readonly attribute set:

v3.33  .open<i>ing</i> reports

>Error: unable to open database "./db/test2.db": unable to open database file

As the file is not .open<i>ed</i>, .databases will not show anything.

v3.34 .open<i>ing</i> reports no error & .databases shows

>main: D:\SQLite32\db\test2.db r/o

The difference in behaviour is that <b>v3.33 would NOT open a readonly database file</b> but v3.34 <b><u>does open</u> a readonly database file</b>.