Click here to Skip to main content
15,867,453 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Getting below error when trying to get the table or procedure scripts from a server based on SQL server 2012 while client machine have the SQL server 2008 version.

Error Message :
"Index was outside the bounds of the array. (Microsoft.SQlServer.Smo)"

Any help solicited.

Thanks!!
Posted
Comments
[no name] 1-Oct-14 7:29am    
The error message is perfectly clear. What did you not understand?
Shivam Sharma 1-Oct-14 8:13am    
Can you elaborate your solution please.
[no name] 1-Oct-14 8:17am    
What "solution" are you referring to? To get a solution you would first have to have some sort of a problem or a question. Just posting an error message is not a problem or a question. And the error message is perfectly clear. The question is, which part of the error message are you unable to understand?
Shivam Sharma 1-Oct-14 8:27am    
Thanks for the reply...
Please read the complete question, i have also mentioned the scenario where i was getting the error. If you have any solution please share.

Below are the exact steps where i am getting the mentioned error, Hope this would help more in disguise the answer.
In Management Studio from Client machine having SQL server 2008 installed while referencing/connected server is SQL server 2012
1. Select a table from Tables
2. Right click on some table and select "Script Table as" option
3. Under this option select "Drop And Create To" option
4. Under which click on "New Query Editor Window"
[no name] 1-Oct-14 13:51pm    
I can assure you, I have read the "question" several times now. "Index was outside the bounds of the array" is a perfectly clear error message that should require no explanation of any kind. So, which part of the error message is somehow not clear to you or you fail to understand?

 
Share this answer
 
Another option is generate the script through code. Here is a good link to create a sp to generate 'Create Table' script.

http://social.msdn.microsoft.com/Forums/en-US/715ccb74-f215-4242-9ce2-0c1563e67ac8/generate-table-create-scripts-using-stored-procedure?forum=sqlexpress[^]
 
Share this answer
 
 
Share this answer
 
This is related to Microsoft Patch that need to be installed before installation of SQL Server 2012 (or you must un-install the Visual Studio 2010 - not recommended).

Below is path for patch and that worked for me. Hope would help.
http://www.microsoft.com/en-us/download/confirmation.aspx?id=23691

Thanks!!
 
Share this answer
 

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