title: C# deleting rows in DataTable
body: <p>I delete rows in a DataTable with this code:</p>
  
  <pre><code>if (x == "y" || x == "yes")           
  {             
      dt.Rows.RemoveAt(id);  
  }
  </code></pre>
  
  <p>How I can save changes (delete row) in MS Access?
  I have code like this, but this doest not work</p>
  
  <pre><code>OleDbCommand delCmd = new OleDbCommand("DELETE FROM PERSONA WHERE ID=?",con1);
  delCmd.Parameters.Add(new OleDbParameter("@ID",OleDbType.Integer, @ID));
  
  foreach (DataRow dro in dt.GetChanges().Rows)           
  {
     if (dro.RowState == DataRowState.Deleted)                                                   
     {    
        con1.Open();    
        delCmd.ExecuteNonQuery();    
        con1.Close();
     }    
  }
  </code></pre>