I am developing the window phone 7 application. I am new to the window phone 7 application. I am using the SQLite database in my application to store & retrieve the data. I am using the following link for database connectivity.
http://wirebear.com/blog/2010/11/12/using-sqlite-in-your-wp7-app
I have followed all the steps given in the article. In the coding section I am getting an error in the following function.
public List<T> SelectList<T>(String statement) where T : new()
{
Open();
SQLiteCommand cmd = db.CreateCommand(statement);
var lst = cmd.ExecuteQuery<T>();
return lst.ToList();
}
At the lst.ToLis开发者_开发知识库t(); statement I am getting the error that 'file is encrypted or is not in database'. Can you please tell how to decrypt this database file if it is encrypted ?. Can you please provide me any code or link through which I can resolve the above issue ? If I am doing anything wrong or misunderstood anything then please guide me.
For example in case of PhotoChooserTask class we copy the content into the isolated storage & then read it back but before that we decode it as follows
var fileStream = store.OpenFile("image.jpg", FileMode.Open, FileAccess.Read);
var imageAsBitmap = PictureDecoder.DecodeJpeg(fileStream);
That message is a standard error one when SQLite can't open the database file. It doesn't necessarily mean the database is encrypted, indeed it almost certainly isn't unless you've specifically tried to encrypt it. It just means the file you're accessing is not a valid normal SQLite database file.
Did you go wrong somewhere earlier, in creating the file or trying to open the wrong file path ?
精彩评论