title: Deleting row from datatable in C#
body: <p>I'm having a problem deleting rows from a datatable. In my program, I am reading info from a database into a datatable using an sql query. I use an oledb connection and the code <code>dt.Load(command.ExecuteReader());</code> to do this. Later, I want to delete rows that match an id string. I have tried the following code buy cannot get it to work:</p>
  
  <pre><code>            DataRow[] drr = dt.Select("Student=' " + id + " ' "); 
              for (int i = 0; i &lt; drr.Length; i++)
                  dt.Rows.Remove(drr[i]);
              dt.AcceptChanges();
  </code></pre>
  
  <p>Can anyone please suggest another way with an example? </p>