Click here to Skip to main content
15,915,172 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
See more:
Hello Friends
I am facing a problem while right click on stroed proc and click on modify to edit some stored procedure in my database.

I see the error dialog box

Script failed for StoredProducre 'dbo.testproc', (Microsoft.SQLServer.Smo)
Additional Information
Index was outside the bound of the array. (Microsoft.SQLServer.Smo)


but I am able to see the script using sp_helptext


How can I fix this.

Please help.
Posted
Comments
BK 4 code 26-Dec-13 7:23am    
Could you please share your store proc here >\?

please see the article

http://support.microsoft.com/kb/2459027[^]

and download a fix for your related sql server version and it will fix the issue..


you can also refer this article for more details on your error and its resolutions please read the comments too..

http://sqlandme.com/2011/05/03/index-was-outside-the-bounds-of-the-array-microsoft-sqlserver-smo-sql-server-denali/[^]
 
Share this answer
 
Hi,

There is installtion proble, here. If you want to edit SP then use command sp_helptext 'stored proc name'. Now you can see the whole SP in result panel. copy that SP in new window and alter your SP and execute it. It will be execute now.
 
Share this answer
 
Comments
darora85 27-Dec-13 3:49am    
I know this way as mentioned in my description. but i want it via modify option
Christian Graus 27-Dec-13 3:51am    
Then you need to fix your installation
The other possible reason is that you have SS2008 client tools, and a SS2012 database. I had the same error, and this was the issue.
 
Share this answer
 
Comments
darora85 27-Dec-13 3:50am    
client tools and db has same version.
Christian Graus 27-Dec-13 3:51am    
That's odd, then it's just hosed.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900