title: using winforms to insert data in sql database , drawback of opening connection frequently
body: <p>I am developing a front-end sales application.</p>
  
  <p>Is this an efficient way of inserting data multiple times into a sql table, from a single button:</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      c.Open();
      string w = "insert into checkmultiuser(username) values (@username)";
  
      SqlCommand cmd = new SqlCommand(w, c);
  
      cmd.Parameters.Add("@username", SqlDbType.VarChar);
      cmd.Parameters["@username"].Value = textBox1.Text;
      //cmd.ExecuteNonQuery();
      cmd.ExecuteReader();
      c.Close();    
  }
  </code></pre>
  
  <p>What are its drawbacks? One would be that again and again the connection is opened and closed when the button is clicked which would effect the speed greatly.</p>