Friday, March 9, 2012

Microsoft.SqlServer.Management

I am looking for a way to script out all tables within a SQL Server 2005 database using VB.NET. I am writing a backup utility and have been able to do stored procedures, the data within the tables, but am now stuck on scripting out the tables with their primary keys, indexes, etc. Sure, I could hard-code some stuff like "CREATE TABLE dbo" & strTable, but I am pretty sure there is a way to do it within VB.NET using SMO. So, any help that someone could offer is greatly appreciated.

Thanks

I just googled it and found the following:

http://www.yukonxml.com/articles/smo/

Not sure if the above will be any help for you

No comments:

Post a Comment