Author: Dman100 | Posted on: 11/8/2009 7:29:49 PM | Views : 417

I created a project where I'm using the northwind database to create some sample pages and I placed the .mdf file in the App_Data folder.  Everything has been working fine.  After creating my sample pages, I executed a lot of CRUD operations against the database.
Now, I want to restore the database to it's original state.  I tried to copy over a new original copy of the northwind .mdf file and it caused errors that the log file didn't match and the login failed.
So, I had to delete the existing .mdf and .ldf files out of the App_Data folder and delete the NORTHWIND.MDF server from the Server Explorer and then I was able to successfully copy the fresh version of the northwind.mdf file back into the App_Data folder and get everything working again with a pristine copy of the northwind database.
Surely, there is a better way to restore the database in the App_Data folder instead of going the long route I had to take.  What is ...

Go to the complete details ...