Visual Studio 2003 to SQl Server 2000

  • Thread starter Thread starter Allen Smith
  • Start date Start date
A

Allen Smith

Is it possible to debug a stored procedure in SQL Server 2000 from VS 2003 ?
Thanks,
Smith
 
Is it possible to debug a stored procedure in SQL Server 2000 from VS 2003 ?
Thanks,
Smith

Depends on what you mean by debug. You can trap SQL errors with a
Try/Catch structure and in the Catch you can display the SQL error
with the Exception.Method property.
 
Yes you can. Search the MSDN help file for 'debug stored procedure' and
you'll find everything you need to know.

Briefly, you right-click on the stored procedure from the server explorer,
and select 'step into stored procedure'. Once you're in, you are prompted
for any input parameters and then can step through the procedure. You have a
locals window, a watch window, and can set break points and so forth.

One thing you'll probably have to do manually is give yourself execute
permissions on the master.sp_sdidebug stored procedure, which you'll find in
the extended stored procedures section in Enterprise Manager.

So far I haven't found any way to leave a breakpoint in the stored procedure
and have it hit from application code. It doesn't look like it's possible.

Tom Dacon
Dacon Software Consulting
 
Back
Top