我有一個SqlCommand字符串創建一個SqlServer的數據表如下:C#,SqlCommand的字符串
`string EFTGeneral = @`"CREATE TABLE [EFT.GER2] (
[TestOrderName] VARCHAR(20) NOT NULL,
[Template] VARCHAR(50) NULL,
[Purpose] VARCHAR(100) NULL,
[Category] VARCHAR(50) NULL,
[DateCreated] DATETIME NULL,
[CreatedBy] VARCHAR(30) NULL,
[TestObjectBatch] VARCHAR(20) NULL,
[LoadDirection] VARCHAR(2) NULL,
[ElementType] VARCHAR(10) NULL,
[FatigueTestType] VARCHAR(50) NULL,
[LoadAmplitude] INT NULL,
[LoadStatic] INT NULL,
[UntilBreakage] VARCHAR(5) NULL,
[NumberOfObject] INT NULL,
[Remarks] VARCHAR(200) NULL,
PRIMARY KEY CLUSTERED([TestOrderName] ASC));";
但我想通過dynamitically創建表的名稱由文本框上面的字符串替換表名。文字,我該怎麼辦?非常感謝
親愛的,謝謝你非常適合你的快速回答。我修復了這個問題: – Nam