Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SMO ScriptingOptions ScriptBatchTerminator doesn't work?

30 views
Skip to first unread message

Bill Cohagan

unread,
Aug 24, 2010, 4:16:03 PM8/24/10
to
I'm trying to generate T-SQL script for tables, views, etc. in a SQL2008
database using SMO script methods. I'm setting the ScriptingOptions object's
ScriptBatchTerminator = true; and BatchSize = 1, but the generate script has
no GO commands inserted.

Consequently the generated script will not run since CREATE VIEW (and
others) must be in their own "Batch". Since these options don't appear to
work I wonder how anyone generates usable scripts vie SMO?

Am I missing something here?

Thanks in advance for any suggestions/pointers, etc.

0 new messages