Im trying to delete an sdf file in the .NET mobile framework, but I get a “File in use” Exception. How do I disable the file so I can delete it?
I want to replace the sdf file with a new sdf file.
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.
SQL Server Compact Edition databases (sdf is the extension for database files) are hosted in process, you will need to close any connections and possibly stop any processes that had them open to delete this file.
Typical candidate processes that can cause this problem are the application itself, Visual Studio or SQL Server Management Studio.