How to read & update data in the Sql ce database located in Windows phone app data folder?

StackOverflow https://stackoverflow.com/questions/22603161

  •  20-06-2023
  •  | 
  •  

Question

I have placed the SQL CE Database file in the installation folder of the Windows phone application.i want to perform Read and Write operations on the database but it was saying Access to the database file is not allowed. Please suggest me how can i achieve this

Était-ce utile?

La solution

You need to copy the database to isolated storage on first run, as the installation folder is read-only. You will also need to change the connection string:

data source=isostore://mydb.sdf

See much more in my blog post here: http://erikej.blogspot.dk/2013/04/generate-windows-phone-8-local-database.html

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top