Deborah's Developer MindScape






         Tips and Techniques for Web and .NET developers.

July 29, 2013

Executing Stored Procedures with SSDT

As part of your development or debugging process, you may need to execute a stored procedure from your development database. That’s easy to do using the SQL Server Object Explorer that is part of the SQL Server Data Tools (SSDT) in Visual Studio 2012.

See this link for an introduction to SQL Server Object Explorer.

To execute a stored procedure from a SQL Server database using SQL Server Object Explorer:

1) Open the SQL Server Object Explorer toolbox using View | SQL Server Object Explorer from Visual Studio.

2) Drill down to your database, then the Programmability node, then to Stored Procedures.

3) Right-click on the stored procedure to execute and select Execute Procedure…

image

4) A Query window is displayed and the code to execute the stored procedure is generated for you. Visual Studio executes the query and displays the results of the stored procedure.

image

5) You can execute the stored procedure again by clicking the Execute button shown as the first icon in the query window toolbar.

Use the SQL Server Object Explorer any time you want to execute a SQL Server stored procedure.

Enjoy!

RSS feed for comments on this post. TrackBack URI

Leave a comment

© 2019 Deborah's Developer MindScape   Provided by WPMU DEV -The WordPress Experts   Hosted by Microsoft MVPs