Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alter Procedure statement in Visual Studio gives 'This statement is not recognized in this context message'

Using Visual Studio 2012. Open Sql Server Object Explorer, open a database.

Click on an existing stored procedure and then right click on "View Code" This will open up a window with a Create Procedure.

Now, change 'create' to 'alter' in order to modify the procedure. Visual Studio will give the error: SQL70001 :: This statement is not recognized in this context.

So how do I alter a procedure from Visual Studio?

EDIT

The solution to this issue is to copy all the text, close all windows, open a new script, paste it in and then it works fine.

Greg

like image 340
Greg Gum Avatar asked Aug 29 '13 17:08

Greg Gum


1 Answers

I had a similar problem and found the solution from this website.

The solution was to go into the property window of the stored procedure and change the Build Action setting to 'None'.

like image 90
Rossygnol Avatar answered Oct 15 '22 18:10

Rossygnol