Generating CREATE Table statements from C#

May 23 2007 6:45 AM
Hi i am trying to crate the CREATE Table script for the selected table from a CheckedListBox in c#,in a checked listbox all table names are listed,if i select the table name and clicked the buttom means it has generate the CREATE TABLE statement for the selected table, for example the Create statement for the table "Debits" should generate like below "CREATE TABLE [dbo].[Debits]( [CreditNo] [int] IDENTITY(1,1) NOT NULL, [AccountNo] [char](20) COLLATE Chinese_PRC_CI_AS NULL, [Amount] [smallmoney] NULL ) ON [PRIMARY] " If someone knows the procedure to do this task please send the links... Thanks Prabhakar

Answers (1)