title: CA2100: Review SQL queries for security vulnerabilities
body: <p>Hey can someone help me with this code?
  (visual studio give me a warning ca2100 and i dont know how to do this, and the solution on google i dont become them to work xD)</p>
  
  <p>Thanks </p>
  
  <pre><code>private void Updatebtn_Click(object sender, EventArgs e)
      {
          String selected = dgv.SelectedRows[0].Cells[0].Value.ToString();
          int id = Convert.ToInt32(selected);
          Update(id, Kundennametxt.Text, Gamecbb.Text, Bezahlungcbb.Text,Bezahltcbb.Text, Erledigtcbb.Text, PayPalEmailtxt.Text,ACCEmailtxt.Text, ACCPWtxt.Text);
      }
  
      private void Update(int id, string Kundenname, string Game, string Bezahlung, string Bezahlt, string Erledigt, string PayPalEmail, 
          string ACCEmail, string ACCPW)
      {
          string sql = "UPDATE kunden SET Kundenname='" + Kundenname + "',Game='" + Game + "',Bezahlung='" + Bezahlung + 
              "',Bezahlt='" + Bezahlt + "',Erledigt='" + Erledigt + "',PayPalEmail='" + PayPalEmail +
              "',ACCEmail='" + ACCEmail + "',ACCPW='" + ACCPW + "' WHERE ID=" + id + "";
          cmd = new MySqlCommand(sql, con);
          try
          {
              con.Open();
              adapter = new MySqlDataAdapter(cmd)
              {
                  UpdateCommand = con.CreateCommand()
              };
              adapter.UpdateCommand.CommandText = sql;
              if (adapter.UpdateCommand.ExecuteNonQuery() &gt; 0)
              {
                  ClearTxts();
                  MessageBox.Show("Successfully Updated");
              }
              con.Close();
              Retrieve();
          }
          catch (Exception ex)
          {
              MessageBox.Show(ex.Message);
              con.Close();
          }
      }
  </code></pre>