SQLite for Windows Runtime is returning an “ReadOn

2019-01-15 16:25发布

SQLite for Windows Runtime is returning an "ReadOnly" error SQLiteException object while inserting a new record in my SQLite database.

I am not sure what's causing it but this "ReadOnly" error is what I got enter image description here

I tried to update the database security and even lamely added "Everyone" to make sure but I still get that error. Any idea why?

1条回答
做个烂人
2楼-- · 2019-01-15 16:45

Application files cannot be changed, hence the "Read-Only" error you are seeing. You are correct instead to copy the file to the LocalFolder, where the application will have full read-write access.

If you need to populate your db with data initially, you can do this either prior to adding the file to the project in Visual Studio, or after the db is in the LocalFolder.

查看更多
登录 后发表回答