all groups > visual studio .net debugging > july 2004 >
You're in the

visual studio .net debugging

group:

Jumping into Stored Procedures from C#


Jumping into Stored Procedures from C# John Puopolo
7/19/2004 3:57:24 PM
visual studio .net debugging: All:

Is there a way to, from C# code, to jump into a SQL Server (2000)
stored procedure? I can certainly jump into one from the Server
Explorer, but it would be very convenient to jump from an ADO.NET
SqlCommand into the stored proc being executed. I could see how this
*could* be done --- just not sure if this is possible given the
current state of the tech/products.

Thoughts? Anyone actually ever do this?

Thanks,
John

RE: Jumping into Stored Procedures from C# richcook NO[at]SPAM online.microsoft.com (
8/17/2004 10:37:40 PM
Hello,

Yes you can debug from an application into SQL code.

I am assuming that you can debug ok from Server Explorer.

Follow these steps:
1, Enable SQL Debugging within the project properties.
Properties-->Debugging-->Enable SQL Debugging = True
2, Enable *App* debugging on the server, by running the following TSQL
code. (This code is not persistant and will have to be done each time the
server is restarted.)
exec sp_sdidebug 'Legacy_on'
3, A BP has to be placed in TSQL code since it is not possible to 'step'
from and App to TSQL.


Start debugging from an F5.

Hope this helps

Rich.
AddThis Social Bookmark Button