Michael Freeman
Michael Freeman

Reputation: 96

VS2012 - "Show Table Data"

I have researched here Visual Studio 2012 - "Show Table Data" missing which is related to the same problem. However, there is neither a clear explanantion on the cause nor instructions to resolve the issue.

I also reviewed VS2012 - "Create table" or "show table data" menu option not shown in Server/Database Explorer

What causes VS2012 server explorer to not display the "Show Table Data" when right clicking on the table object? How do you restore this feature?

Thank you in advance.

Upvotes: 4

Views: 2468

Answers (3)

subsci
subsci

Reputation: 1740

In my case I wanted SQLEXPRESS and not LocalDB because I wanted to run the full IIS and not Development Server. One answer reverted back to LocalDB, but I could not do that.

On first try "Show Table Data" failed. But I made the "Show Table Data" work by modifying the new SQLEXPRESS connection string that VS2012 created. I removed the AttachDbFilename=|DataDirectory| and the User Instance=True from the new connection string.

Show Table Data Fails:

<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 Works:

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

One additional note. In my case the SQLEXPRESS is a named instance, as you can see form the Data Source in the connection string.

Upvotes: 0

Michael Freeman
Michael Freeman

Reputation: 96

Case: My case for this issue was based on the installation of SQL Server Express. Once SQL Server Express was installed 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 want to pay attention to this part of the connection string: connectionString="Data Source=(LocalDb) This is the correct one.

You will need to comment out the other connection string: connectionString="Data Source=.\SQLEXPRESS;

Once you are using the LocalDb instance you will be able to see the "Show Table Data" by right clicking on the table. Hope this helps someone else.

Upvotes: 1

AaronLS
AaronLS

Reputation: 38392

Are you sure you haven't confused the "Server Explorer" with the "SQL Server Object Explorer"(under View menu)? They are two different things, even though they appear to be very similar. One has features the other does not.

Upvotes: 0

Related Questions