To filter your data, you can either create a DataView object, or use the Select() method of the DataTable class.
Select() returns an array of DataRow objects. Here's a partial sample of how to use this feature:
Dim cn as SqlConnection
Dim da as SqlDataAdapter
Dim ds as DataSet
Dim row as DataRow
Dim myRows() as DataRow
|
'Make your connection
'Create your DataAdapter
'Fill your DataSet
|
myRows = ds.Tables("Customers"

.Select("type='retail'", "name ASC"
For Each row in myRows
'processing here
Next
This will return all the rows in the "Customers" DataTable that have a "type" of "retail" sorted by "name."
Here's how use a DataView object to filter data:
'Dim and instantiate your Connection, DataAdapter, DataSet objects as before.
Dim myDataView as DataView
Dim myRow as DataRowView
myDataView = ds.Tables("Customers"

.DefaultView
myDataView.RowFilter = "type='retail'"
myDataView.Sort = "name ASC"
For Each myRow in myDataView
'etc...
hth
Mark