Click here to Skip to main content
15,893,594 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello,

I have an mdf file named sample.pdf. It has some tables. I am trying to open that file through My computer->C drive->program file->Microsoft SQL server->MSSQL->
Data->sample.pdf.

If I double click on that sample.mdf file.. I am getting error like

"The file cannot be opened because it is used by another program"

How can I open that file.. Please help me

Thank You
Posted

You need to attach the mdf file to your database. The below links show how to do it
http://www.c-sharpcorner.com/uploadfile/raj1979/how-to-attach-a-database-in-sql-server-2005/[^]
http://blog.sqlauthority.com/2010/04/26/sql-server-attach-mdf-file-without-ldf-file-in-database/[^]
Once you attach the mdf file you can query the tables in the query window.
 
Share this answer
 
U cant open like that.. U can open that by attaching that to server database
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900