Delete a group of records in a DataTable.

  • Thread starter Thread starter Mufasa
  • Start date Start date
M

Mufasa

I have a datatable with a whole lot of rows in it. It's a datatable I have
manually created that I will be manipulating. I include a date as part of
the record. I want to delete everything that is older than 10 days. In SQL I
would do something like:

delete from Data where WhenDate < '12/01/2008'

How can I accomplish the same thing in .Net without spinning through all of
the records?

BTW - this dataset never is actually written to a database; it's manipulated
locally and when done it's written out to disk.

TIA - Jeff.
 
You can select that group of rows using a filter or a LINQ to DataSet query
but at the end you'll have to delete them one by one.
 
Back
Top