I’ve got a Windows 8 store app where I’ve created an “App_Data” folder. I added an sqlite database file and now I’m trying to get the file path to create a connection.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I added my existing sqlite file to the project’s Common folder and I set the Build Action to Content. You cannot write to this file, so you need to copy it to the application’s local storage folder. I created a StorageManagement class to initialized my database when the application starts up.
If the database file isn’t already in the local storage folder, only then will it copy the file from the common folder. I can then create my sqlite connection using the file in the local storage.