View data of .mdf file within visual studio
Go to View > SQL Server Object Explorer right click the SQL Server node
and select Add SQL server
.
But be aware. If you are developing a program that uses this connection to, then the application might throw an exception saying that you can connect to the database only once.
Admin
Updated on June 27, 2022Comments
-
Admin almost 2 years
I have a simple problem but have searched all across google and SO to no avail.
I have a
.mdf
file that has 3 tables, I am working with this file in ASP.NET WebForms e.g updating, adding data etc... I want to be able to view the contents of the.mdf
file in Visual Studio to make sure that the queries (written in C#) are working correctly.At the moment I am doing this by opening the file in SQL Server 2014 but that way I have to close visual studio as the file can only be used on instance.
I know this can be achieved by connecting to a server but this is and
.mdf
file.Any suggestions?