Working with Managed Stored Procedure using Visual Studio 2005
page 4 of 5
by Srinivas Jadhav
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 24351/ 76

Debugging Managed Stored Procedure

You can now debug the CLR Stored Procedure the same way as the T-SQL Stored Procedure.

Following are the steps used to debug it.

In the Solution Explorer, right click the Test Scripts and Add Test Script; Test1.sql is added.

Rename it to MyManagedProcedure.sql.

Now you add the following code.

Listing 12

DECLARE @sal float
DECLARE @cnt int
SET @sal = 2200
SET @cnt = 0
EXECUTE [ManagedStoredProcedure].[dbo].[MyManagedProcedure] 
  ,@cnt OUTPUT
Print @cnt

Set the break point in the code.

Open Server Explorer View > Server Explorer.

Right Click Database and Apply Allow SQL/CLR Debugging

Debug > Start Debugging. The Yellow Pointer appears at the break point.

You can view the Output.

View Entire Article

User Comments

No comments posted yet.

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2021  |  Page Processed at 2021-12-05 6:52:22 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search