Page 1 of 1

Metro - Problem with journal file

Posted: Mon 04 Mar 2013 12:17
by dilbert
I also experience problem with LinqConnect for Metro sometimes when running asynchronous queries updating database.

Sometimes there is an exception thrown randomly:
"Some kind of disk I/O error occurred" or
"Unable to open database file"

After a long debugging I found out the problem occurs only if the journal_mode of SQLite is set to "DELETE" (which is default value). If I changed it e.g. to TRUNCATE it executes correctly.

So I have to use following statement as a workaround for initializing a datacontext:

Code: Select all

SQLiteConnection conn = new SQLiteConnection(_connectionString);
conn.Open();
MyDatabaseContext dbContext = new MyDatabaseContext(conn);
SQLiteCommand cmd = new SQLiteCommand("PRAGMA journal_mode = TRUNCATE", conn);
cmd.CommandType = CommandType.Text;
cmd.ExecuteNonQuery();
return dbContext;

Re: Metro - Problem with journal file

Posted: Wed 06 Mar 2013 13:21
by MariiaI
This issue may be caused for the same reasons as in the topic http://forums.devart.com/viewtopic.php?t=26117.
So we recommend you to upgrade your version of LinqConnect for Metro to a newer one in case you use a version older than 4.1.184.
In other case, please send us a sample project with which this error could be reproduced so that we are able to investigate it in more details.