I have a Sqlite database that I include in my MonoTouch application. So far, it worked perfectly, but now I want to open it only in read-only mode, and not read-write.
So, I changed the connection string to include Read-Only = True, but when I call Open (), I get the following error:
Library used incorrectly (at Mono.Data.Sqlite3.Open)
If I dig into the exception, it shows
_errorCode = Misuse
and what about all the information he gives.
Here is the code:
var _conn = new SqliteConnection("Data Source=db/sampleDb;Read Only=True"); _conn.Open ();
source share