title: Edit row in a dataset C#, it does not save
body: <p>I want to change some rows depending on a filter but it does not save the info. This is my code:</p>
  
  <pre><code>foreach(DataRow dr in datosingDataSet.Tables["inve"].Rows) // search whole table
  {
      cc = Convert.ToInt32(dr["nsuc"].ToString());
      ff = Convert.ToInt32(dr["bod"].ToString());
  
      if (cc == csuc &amp;&amp; ff == bod) // if id==2
      {
          MessageBox.Show("** SI SE HACE LA CONSULTA**", "ERROR");
  
          dr["estado"] = "AP"; //change the name
          //break; break or not depending on you
          dr.AcceptChanges();
      }
  }
  
  -----------------------------------------------------------------------------------------------------------------------------------------
  
  foreach(DataRow rowp in datosingDataSet.inve.Select("nsuc = " + csuc + " and bod = " + bod)) {
      rowp.BeginEdit();
      rowp["estado"] = "AP";
      rowp.AcceptChanges();
  }
  </code></pre>
  
  <p>Any of them work. Can anyone please help?</p>