开发者

.mdf file opening problem

I created myFile.mdf using SQL Server Man开发者_StackOverflow中文版agement Express and saved some data to it using vb.net. When I tried to open it in SQL Server Management Express, It did not open it saying there is no editor available for it. How to open this file?

Thanks Furqan


You can't open it. It's a database file and must be attached as database in the SQL Server, e.g. by using SQL Server Management Studio. Then you can browse the tables and the data.

And, you can't just write any data to it, like to a text or binary file. You must use a database connection provider to write your data from .NET.


If you have SQL Management Studio installed, I expect you also have SQL Server installed?

When you first open SQL Management Studio you should be presented with a connect box. "Server Name" should have a little arrow on the right to open a dropdown box and select the SQL Server you want to manage. It should find any local server itself and be able to connect with Windows Authentication (no password for you locally)

Once you connect to the SQL Server you will see your tables and stuff in the left window.

SQL MS can't open an mdf file. The mdf file is created by the SQL Server itself and if you do have it running on your PC, you can expect to find the mdf in the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL area on your disk.

Nobody can open that file directly but they can copy it into their own SQL Server folder and use the data I do believe, should they manage to get a copy.


SQL Server Express is an instance of a database. You can't "open" it you can only "connect" to it.

Please provide steps on exact how you created the database and how you are attempting to open it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜