I am finishing up some homework for an ASP.NET class and I am not sure how to proceed. First, all of the previous homework requiring database access has included a database file I downloaded from the class website. This was easy to move around, easy to include in a project, etc. This final project is a little different though. I had to make the database myself, include it in the project, and I have to find some way to upload it as part of the project. This last part is the part I am sticking on. I searched through the file system and found a .mdf file that matched the database I made. When I tried to use the "Add existing item" dialog to add the .mdf file to the project I was given an error that it could not be added access is denied. When I tried to copy and paste the .mdf file straight into the App_Data folder, it fails because the "file is open in SQL Server, close the file and try again."
How do I make my database that I created in SQL Server 2008 into a "mobile" database file like those I was able to just download from my class website?
Edit: Oh my gosh! My wife was browsing through my textbook and found EXACTLY what I was looking for. All I had to do was detach the database. I had seen it as an option in SQL Server Management Studio, but I had no idea what exactly it did, so I didn't use it for fear of ruining my work.
Last edited by canorous1; 12-10-11 at 18:11.
Reason: Found answer