Link to home
Start Free TrialLog in
Avatar of JMO9966
JMO9966

asked on

VB.Net GetChildRows command ?

Hello,

I'm using the following code to retrieve Child rows from a VB.Net DataRelation.

drVendorsMain = New DataRelation("drVendorsMain", dsMRP.Tables("Material").Columns("Material"), dsMRP.Tables("Vendor_Material").Columns("Material"), False)
dsMRP.Relations.Add(drVendorsMain)


What I'm trying to do is loop through multiple rows that may be returned by the GetChildRows command.  Here's my code that collects the value from one row, but I need to retrieve multiple rows one at a time in certain cases.  Please help.

Dim dRows() As System.Data.DataRow = dsMRP.Tables("Material").Rows(i).GetChildRows("drVendorsMain")
If dRows.GetLength(0) > 0 Then
      BackupVendor = dRows(0).Item("Backup_Vendor")
End If

Thanks,
JMO9966
ASKER CERTIFIED SOLUTION
Avatar of mankowitz
mankowitz
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
SOLUTION
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