Hi,
We’re having great success with SQLite.net – but a few days ago we encountered an intermittent error in a log file that has us puzzled:
:Exception Message- Attempt to write a read-only database attempt to write a readonly database
:Exception Source- System.Data.SQLite
:Exception Site- Int32 Reset(System.Data.SQLite.SQLiteStatement)
:Exception Type- System.Data.SQLite.SQLiteException
:SQLiteException ErrorCode- ReadOnly
:ExternalException ErrorCode- -2147467259
:Exception Stack- at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt) at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt) at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery() at System.Data.SQLite.SQLiteTransaction..ctor(SQLiteConnection connection, Boolean deferredLock) at System.Data.SQLite.SQLiteConnection.BeginTransaction(Boolean deferredLock) at System.Data.SQLite.SQLiteConnection.BeginTransaction() at
:
There are a few things that are weird about this:
- The database query in question is a “SELECT” statement.. so I’m not sure where writing comes into play.
- File Permissions seem to be fine – a few seconds before the log statement we accessed the database just fine, and generally on this users machine we’ve had no problems before or since writing or reading.
- We haven’t been able to reproduce it since, although the user saw it twice in a row (he shut down the app, then went through the same sequence of operations). However, since then he hasn’t seen it.
Any thoughts on what could be going on or on how we could further troubleshoot this?
Thanks!
Orlando