I'm looking for a way to get the output from a "SCRIPT AS ... CREATE TO ... New Query Window" under SSMS, but using VB.NET (or C#) code to initiate the output which I can then save off or use internally in my .NET application.Basic idea is that:1. Connect to a master server2. Initiate SCRIPT AS ... CREATE TO ... on an existing table3. Use the scripted TSQL in my application to create that table on another SQL instance/serverExample of scripted output that I want to use in my .NET application
/****** Object: Table [dbo].[MyTable] Script Date: 03/09/2010 08:24:52 ******/
IDENTITY(1,1) NOT NULL,
[MyField2] [nvarchar](5) NOT NULL,
[MyField3] [bigint] NOT NULL,
I've looked at sp_helptext, but I don't think that is what I need, not sure.Thanks, Rob.
View Complete Post