private void button1_Click(object sender, EventArgs e) { SqlConnection CON = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True"); CON.Open(); SqlCommand cm = new SqlCommand("insert into table3 (name) values(@name)", CON); cm.Parameters.AddWithValue("@name", textBox1.Text); cm.ExecuteNonQuery(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)