private void button4_Click(object sender, EventArgs e) { conn.Open(); string query = "insert into add_customer(customer_name,customer_email,customer_mobile,customer_address) values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')"; MySqlDataAdapter sda = new MySqlDataAdapter(query, conn); sda.SelectCommand.ExecuteNonQuery(); conn.Close(); MessageBox.Show("Type successfully added"); Form10 s = new Form10(); s.Show(); this.Hide(); }