January 31, 2012 at 9:21 am
Hi,
I am getting below error while trying to read stored procedure script from database using SMO.
Script failed for StoredProcedure
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.EnumScriptImpl(ScriptingOptions so)
at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ScriptImpl(ScriptingOptions so)
at Microsoft.SqlServer.Management.Smo.StoredProcedure.Script()
Please help me in solving this.
Thanks,
Vijay
November 22, 2012 at 1:19 am
I had the same problem.
The reason was in the comments placed before the "CREATE/ALTER PROCEDURE" command.
There was this kind of comments:
/*
sql stuff
/*
sql stuff
*/
sql stuff
*/
So, I cleaned by removing the inner comment leaving the following:
/*
sql stuff
*/
This solved the problem.
HTH
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply