currently my mdf file is in (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data ) this location i want to put this mdf file on App- folder in application i want it configure it . no idea
Please help.
thank you
Mdf help
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Vidya Vrat AgarwalRank #130 · 17.2K reputationPosted Jan 31, 2013, 8:39 AM EST
Let me say it again what you are trying to do. You have a SQL Server Db and it's created under SQL Path in "Program Files", and you want to take it out to your Application's App folder location. Correct?
This is simple,
1-cut or copy the .mdf and .ldf from "Program Files" under your App folder.
2- Drop currently existing database from SQL Server Management Studio, as its referring to "Program Files" .mdf /.ldf.
3- Select Database node, Right-click, Attach and select path of your App Folder to .mdf and .ldf. Attach Db.
4- If Db is not listed, then Refresh Database node.
Hope this will help. In case this doesn't then please elaborate/explain what exactly is your scenario and what you are planning to achieve.
Thanks