Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Be Careful Creating Scripts
Message
 
To
25/04/2006 20:02:37
General information
Forum:
Microsoft SQL Server
Category:
Other
Miscellaneous
Thread ID:
01116531
Message ID:
01117215
Views:
15
>I found what I consider to be a bug in SQL 2005's Management Studio for creating scripts.
>
>When you right-click on any object, say a Table, and choose "Script Table As" and choose to output the generated script to either a new Query window or a File, you will get hidden characters at the beginning. The hidden characters don't mess up the execution of the query when running it in the Management Studio, or even when running a saved file from SQL 2000's Query Analyzer.
>
>But, if you rely on using these scripted files in any application that makes use of SQLDMO, beware ... they won't work. The hidden characters cause your script to be unrecognizeable. I don't know if SQL 2005 has a new SQLDMO version or not (I can't find any reference to it), but this is a "gotcha" to look out for.
>
>The workaround is to script it to the clipboard and paste it into your Query window or file. The hidden characters don't appear then.
>
>Just a heads-up FYI ...


I found that myself. I'm porting a mother of a system over to 2005. I have found that my best mthod is to use the clipboard, and paste to where ever I needed it.
Previous
Reply
Map
View

Click here to load this message in the networking platform