By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,920 Members | 1,660 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,920 IT Pros & Developers. It's quick & easy.

DataTable.Select problem <need suggestions>

P: n/a
..NET 2.0

I'm working on a .NET 2.0 project which are using a DataSet for all
communication with the database.

Here is the problem:
I want to search a table based on a matching criteria (I call it
"criteriaA"). This result can give me multiple rows. For each of these rows
in the result, I need to perform another test to determine if other rows
also have this criteria...

So it's 2 selects: first select gives some rows, Each row contains a value
("criteriaB") which I need to perform another select on: select all records
matching criteriaB but are different from criteriaA

This could easly be done in a stored procedure, but we are not using that in
this project.

The DataSet we are using contains the DataTable which have the data I want
to select from.

I'm thinking about selecting the rows using the DataTable.Select method. The
first select add items into a generic list. And then I loop through the
generic list performing another select which again add items into another
generic list... Here I'll use 2 loops to create the result I want... But
there must be a better way doing this, or so I hope indeed

Any suggetions?
Jul 20 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.