VS2012 - "Show Table Data"

I researched here Visual Studio 2012 - "Show table data" is missing , which is due to the same problem. However, there is no clear explanation of the causes and instructions for resolving the problem.

I also reviewed VS2012 - Create Table. or "show table data" menu item that is not displayed in the server / database browser

What causes the VS2012 server explorer not to display "Show table data" when right-clicking on a table object? How to restore this feature?

Thanks in advance.

+4
source share
3 answers

Case: My case for this problem was based on installing SQL Server Express. After installing SQL Server Express, the connection string was updated in VS2012 to use this new instance.

Solution: I uninstalled SQL Server Express and had to update the connection string in VS2012.

In the WebConfig file, you should pay attention to this part of the connection string: connectionString = "Data source = (LocalDb) This is the correct option.

You will need to comment on another connection string: connectionString = "Data source =. \ SQLEXPRESS;

Once you use an instance of LocalDb, you can see the "Show Table Data" by right-clicking on the table. Hope this helps someone else.

+1
source

Are you sure you did not confuse Server Explorer with SQL Server Object Browser (in the View menu)? These are two different things, although they seem very similar. One has functions, the other does not.

0
source

In my case, I wanted SQLEXPRESS, not LocalDB, because I wanted to run full IIS, not the development server. One answer returned to LocalDB, but I could not do it.

On the first attempt, "Show table data" failed. But I did "Show table data" by changing the new SQLEXPRESS connection string created by VS2012. I removed AttachDbFilename = | DataDirectory | and User instance = True from the new connection string.

Show table data:

<add name="DefaultConnection" connectionString="Data Source=instance\SQLEXPRESS;AttachDbFilename=|DataDirectory|\aspnet-mydb-20131028231936.mdf;Initial Catalog=aspnet-mydb-20131028231936;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient" /> 

Show table data:

 <add name="DefaultConnection" connectionString="Data Source=instance\SQLEXPRESS;Initial Catalog=aspnet-mydb-20131028231936;Integrated Security=True;" providerName="System.Data.SqlClient" /> 

One more note. In my case, SQLEXPRESS is a named instance, as you can see that the data source is in the connection string.

0
source

Source: https://habr.com/ru/post/1488558/


All Articles