private void button1_Click(object sender, EventArgs e) { string strConn = @"Password=Admin123;Persist Security Info=True;User ID=sa;Initial Catalog=Employee;Data Source=NAVUY-24B"; SqlConnection conn = new SqlConnection(strConn); conn.Open(); SqlCommand sqlCmd = new SqlCommand("alter table Employee ADD '" + textBox1.Text + "' varchar(50)", conn); sqlCmd.ExecuteNonQuery(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)