Delete a group of records in a DataTable.

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.
 
M

Miha Markic

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top