I am using the code I inserted below to search through a DataTable in
my DataSet. When I search through this DataTable, it returns to the
taxRow that I declare as a DataRow.
I want to know if I can search through the results of the taxRow
DataRow. In this DataSet there can be more then one tax value for each
state. For instance...
NY can have one tax value, the minimun dollar amount would be $0 and
the maximum dollar amount would be $100. For that group, the tax value
would be .0643.
Ny can have another tax value, the minimum dollar amount would be
$100.01 and the maximum dollar amount value would be $1000. For that
group, the tax value would be .09342.
When I use the code below to search through the DataSet, I would have
two rows returned for New York in the taxRow. I want to search through
the taxRow DataRow to find certain values that I may need to update.
I hope this helps.
Thanks.
Scott
Izzy wrote:
I'm a little confused as to what your trying to accomplish. Can you
provide more details as to what your trying to accomplish.
samoore33 wrote:
I use the code below to return rows matching the state in the theState
variable. I want to know if it is possible to search through the
DataRow that I am returning with the search. I understand that that
creates a DataRow Array.
I searched through group postings and found where Cor had said
something about bulding the DataTable back, not sure what that meant of
if I could use it with this, but any help would be appreciated.
Dim t As DataTable
t = myDataSet.Tables("State")
Dim strExpr As String
strExpr = "id = '" & theState.ToString() & "'"
Dim foundRow() As DataRow
foundRow = t.Select(strExpr)
Dim taxRow() As DataRow
taxRow = myDataSet.Tables("Tax").Select("Taxes_Id = '" & foundRow(0)(3)
& "'")
Scott