SQL03070: This statement is not recognized in this context

Posted by prash on Geeks with Blogs See other posts from Geeks with Blogs or by prash
Published on Sat, 29 May 2010 09:08:46 GMT Indexed on 2010/05/29 9:53 UTC
Read the original article Hit count: 1195

Filed under:

Recently I have started working with VS2010 and Fx4. There have been various challenges. We also introduced a new Database Project in our solution. And found this error.

The reason for this error is: the project system expects the stored procedure as a create statement only.  The additional statements to drop if existing are not necessary within the project system.  Project deployment takes care of detecting if the sproc already exists and if it needs to be updated.

To resolve this error you can simply remove the additional statements other then your create SP, Function etc.

OR

Exclude the file from build. Right Click on your file in Solution Explorer, Click Properties > Build Action > Not in Build

© Geeks with Blogs or respective owner