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

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] 
   @sal
  ,@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-2024 ASPAlliance.com  |  Page Processed at 2024-04-23 6:27:50 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search