Just reading some other post I tried this
with an ENTER after the GO
execute w run as script checked
CREATE PROCEDURE {databaseOwner}{objectQualifier}UpdateFeedbackStatus
@ModuleID int,
@FeedbackID int,
@Status int
AS
IF @Status = 4
DELETE {databaseOwner}[{objectQualifier}Feedback] WHERE FeedbackID = @FeedbackID
ELSE
UPDATE {databaseOwner}[{objectQualifier}Feedback]
SET Status = @Status
WHERE FeedbackID = @FeedbackID
GO
ENTER
This is the error message I get:
System.Data.SqlClient.SqlException: There is already an object named 'UpdateFeedbackStatus' in the database. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) CREATE PROCEDURE dbo.UpdateFeedbackStatus @ModuleID int, @FeedbackID int, @Status int AS IF @Status = 4 DELETE dbo.[Feedback] WHERE FeedbackID = @FeedbackID ELSE UPDATE dbo.[Feedback] SET Status = @Status WHERE FeedbackID = @FeedbackID System.Data.SqlClient.SqlException: Could not find stored procedure 'ENTER'. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at DotNetNuke.Data.SqlDataProvider.ExecuteADOScript(String SQL) at DotNetNuke.Data.SqlDataProvider.ExecuteScript(String Script, Boolean UseTransactions) ENTER