Link to home
Start Free TrialLog in
Avatar of fly412s
fly412s

asked on

Search a DataSet using SQL Select statements

Please tell me if it is possible and if it is how to use SQL select statements to query a dataset.

Thank-you
ASKER CERTIFIED SOLUTION
Avatar of Bob Learned
Bob Learned
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dstanley9
dstanley9

You can Query a DataTable:

DataTable table = new DataTable();
// fill rows
DataRow[] rows = table.Select("{field} = {value}","{sortcolumn}");

the first parameter is essentially the WHERE clause, and the second (optional) parameter is the ORDER BY clause