TechTalkz.com Logo

Go Back   TechTalkz.com Technology & Computer Troubleshooting Forums > Tech Support Archives > Programing Languages > C#(C Sharp)

Notices

Reply
 
Thread Tools Display Modes
Old 15-12-2007, 03:28 AM   #1
Ronald S. Cook
Guest
 
Posts: n/a
How remove rows from DataTable where column=value?

I have a DataTable like

Id Code Value
1 TAB Inventory
2 TAB Marketing
3 GRP Pens
4 ICO Lot

I would like to remove all rows where Code=TAB since I'm done with that
part.

The reason I want to do this is so the DataTable (which will be in memory
fro the entire app session) will be as small as possible.

I could do it in a for loop but is there a better way?

Thanks,
Ron

  Reply With Quote
Old 15-12-2007, 06:16 AM   #2
Marc Gravell
Guest
 
Posts: n/a
Re: How remove rows from DataTable where column=value?

> I could do it in a for loop but is there a better way?

I don't think so. Loop it is...

Actually, even if you remove it from the DataTable, the DataSet might
still have hooks on it for change-tracking - something else to be
aware of...

Marc
  Reply With Quote
Reply

Thread Tools
Display Modes


Google
 


All times are GMT +5.5. The time now is 05:37 AM.


vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO
Copyright © 2005-2008, TechTalkz.com. All Rights Reserved - Privacy Policy
Valid XHTML 1.0 Transitional