Using Server Explorer in Visual Studio 2010 to browse and query a SQL Server – there are some stored procedures for the database but I could not find a way to view the body of the stored procedure in Visual Studio.
From this MSDN article I tried a few hints, but I kept getting:
The EXEC SQL construct or statement is not supported
Is there no way to do this from Visual Studio? I eventually solved my problem by installing SQL Management Studio; but I am hoping there is a way to do this in Visual Studio.
Update:
- I am not using a project – that is, I am not in an active project in Visual Studio; it is a simple case of browsing the database’s objects and executing some queries from the Server Explorer window.
- The database server appears in the Server Explorer tree as
SQLEDB.SERVER-NAME.DBNAME - Visual Studio 2010 already has SP1 applied
- The same credentials allow me to view the body of the stored procedure when I connect via SQL Management Studio.
- SQL Server version is
SQL Server 8.0.2055 (8.0 SP4) - Workstation is running Windows XP Professional (so SQL Server Data Tools cannot be installed)
Server ExplorerOpenhttp://msdn.microsoft.com/en-us/library/saezsty3(v=vs.100).aspx
Or if you have Sql Server Data Tools installed
SQL Server Object Explorerfrom the view menu.View Code