Hello,
We are using encrypted SQLite database files in a .NET 4 application.
Several times a week we get an exception when opening the SQLiteConnection.
Currently there are about hundred clients with different versions of windows using the application. Restarting the app normally solves the problem until the next time. So the file itself seems to be OK. I have logged the connection string including the password and the password is correct.
It does happen on local files as well as on files located on a network share.

The System.Data.SQLite.dll from sqlite-netFx40-static-binary-bundle-Win32-2010-1.0.81.0.zip is located in the application folder. The error also occurred with the two previous versions we used while being in development.
We have not found a way to reproduce the issue and no idea what the problem is.

The stacktrace is:
Message: File opened that is not a database file
file is encrypted or is not a database
at System.Data.SQLite.SQLite3.Prepare(SQLiteConnection cnn, String strSql, SQLiteStatement previous, UInt32 timeoutMS, String& strRemain)
   at System.Data.SQLite.SQLiteCommand.BuildNextCommand()
   at System.Data.SQLite.SQLiteCommand.GetStatement(Int32 index)
   at System.Data.SQLite.SQLiteDataReader.NextResult()
at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave)
   at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.SQLite.SQLiteCommand.ExecuteNonQuery()
   at System.Data.SQLite.SQLiteConnection.Open()

By looking at the source code this must be one of the commands setting the pragma values for the connection.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to