开发者

Debugging a stored procedure

开发者 https://www.devze.com 2023-04-02 16:33 出处:网络
I have the following stored procedure: USE [OfficeAuto] GO /****** Object:StoredProcedure [dbo].[INSERT_Project]Script Date: 09/06/2011 10:42:44 ******/

I have the following stored procedure:

USE [OfficeAuto]
GO

/****** Object:  StoredProcedure [dbo].[INSERT_Project]    Script Date: 09/06/2011 10:42:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO

ALTER procedure [dbo].[INSE开发者_JAVA技巧RT_Project]
...

When I try to debug this, I cannot step past SET ANSI_NULLS ON. The debugger just stops. I thought I could step through a stored procedure just like through code in VS. Not sure what I am doing wrong.


OTOH, I'd remove some of the GO because the use of GO is a batch terminator, which signifies the end of a command. (Indicates the end of a batch of SQL statements). As I see it, this should work fine:

SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[INSERT_Project]
...

Also worth noting that GO is not a T-SQL command, rather use BEGIN and END.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号