title: When i click the update button to update database values in SQL C# All Rows Are Affected by the same value
body: <p><a href="http://i.stack.imgur.com/cnrZm.png" rel="nofollow">This is my screen shot</a></p>
  
  <p>Bellow Is My Code For Update Button Click Event!</p>
  
  <pre><code>    {
          try
      {
  
          con = new SqlConnection(cs.ConDB);
          con.Open();
          string cb = "Update tblFees set Salutation= '" + cmbSalutation.Text + "' , Name= '" + tbName.Text + "',Sex = '" + cmbSex.Text + "', Date ='" + Date.Text + "',Fees_Amount='" + cmbFeesAmount.Text + "',Fees_Status='" + radioButton1.Checked + "'";
          cmd = new SqlCommand(cb);
          cmd.Connection = con;
          cmd.ExecuteReader();
          con.Close();
          MessageBox.Show("Successfully updated", "Record", MessageBoxButtons.OK, MessageBoxIcon.Information);
  
          btnUpdate.Enabled = false;
          btnSave.Enabled = true;
      }
      catch (Exception ex)
      {
          MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
      }
      try
      {
          con = new SqlConnection(cs.ConDB);
          con.Open();
          cmd = new SqlCommand("SELECT * From tblFees", con);
          SqlDataAdapter myDA = new SqlDataAdapter(cmd);
          DataSet myDataSet = new DataSet();
          myDA.Fill(myDataSet, "tblFees");
          dataGridView1.DataSource = myDataSet.Tables["tblFees"].DefaultView;
          con.Close();
  
  
      }catch (Exception ex)
          {
  MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK,                          MessageBoxIcon.Error);}`
  </code></pre>
  
  <p>Please Solve my problem i am new in the programming world
  any help would be greatly appreciated</p>