jrvbdeveloper
Member
- Joined
- Jul 15, 2007
- Messages
- 17
- Programming Experience
- Beginner
Hi,
Lets say I have a datatable which contains 8 columns. What I need to do is iterate through the datatable a few group of rows at a time. I need to retrieve all rows that have the same colA,colB,colC,colD and do some processing. Then I need to retrieve the next group that the same colA-D and do some processing,etc.
What is the best way to accomplish this? Is it through a copy of the datatable on which I retrieve the first row and go dataTable.Select(where col=...) and after processing simply delete the records? Then look at the next record,etc? Is there an easier way to accomplish this? Note that I cant do a group by as that's not what i need.
Thanks
Lets say I have a datatable which contains 8 columns. What I need to do is iterate through the datatable a few group of rows at a time. I need to retrieve all rows that have the same colA,colB,colC,colD and do some processing. Then I need to retrieve the next group that the same colA-D and do some processing,etc.
What is the best way to accomplish this? Is it through a copy of the datatable on which I retrieve the first row and go dataTable.Select(where col=...) and after processing simply delete the records? Then look at the next record,etc? Is there an easier way to accomplish this? Note that I cant do a group by as that's not what i need.
Thanks