G
Geoff Jones
Hi
Suppose we have an array of DataRows e.g.
Dim drMyRows() As DataRow = myTable.Rows(0).GetChildRows("PricesCompany")
generated via a relationship.
The question I have is this. Isn't this in essence a table i.e. a collection
of rows? The reason I ask is that I wanted to extract from the array of rows
certain rows satisfying a given condition. Now, if this had been a
DataTable, I could have done something like:
Dim strCriteria As String = "Prices = '2' AND Company = 'ABC Ltd'"
Dim strSortOrder As String = "Town DESC"
Dim aRows As DataRow() myNewTable.Select(strCriteria, strSortOrder)
Is there a way of doing this with the array of rows? Ok, I suppose I could
create a new table using the array of rows but this will surely increase the
amount of processing. Is there an easier and more efficient way to do this?
Thanks in advance
Geoff
Suppose we have an array of DataRows e.g.
Dim drMyRows() As DataRow = myTable.Rows(0).GetChildRows("PricesCompany")
generated via a relationship.
The question I have is this. Isn't this in essence a table i.e. a collection
of rows? The reason I ask is that I wanted to extract from the array of rows
certain rows satisfying a given condition. Now, if this had been a
DataTable, I could have done something like:
Dim strCriteria As String = "Prices = '2' AND Company = 'ABC Ltd'"
Dim strSortOrder As String = "Town DESC"
Dim aRows As DataRow() myNewTable.Select(strCriteria, strSortOrder)
Is there a way of doing this with the array of rows? Ok, I suppose I could
create a new table using the array of rows but this will surely increase the
amount of processing. Is there an easier and more efficient way to do this?
Thanks in advance
Geoff