我試圖根據在TextBox1的。我是在下面的代碼得到錯誤給出的名稱創建一個表表時:正確語法創建自TextBox名
附近有語法錯誤拉梅什「。
這裏Ramesh是文本框中的值。
string Customername = Textbox1.text
SqlCommand cmd7 = new SqlCommand("CREATE TABLE '" + CustomerName + "' (ItemCode int,Quantity int,PricePerQuantity int,Brand char(50),Discount int , DateTime datetime)",connection
謝謝。是的,我嘗試過使用這個,錯誤消失了,但表格並未在數據庫中創建。 –