J
Jeff
..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?
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?