I have a dataset with two data tables and a data relation.
When I fill these tables using a DataAdapter from existing data in the database, I can successfully navigate from a row in my parent table down to the rows in my child table like so:
Where drParent is my ParentDataRow and relParentChild is my DataRelation.VB Code:
drParent.GetChildRows(relParentChild)
However, when I want to add a new record in each table (that relate to each other) like so:
I then try to get to my child rows like so drParent.GetChildRows(relParentChild) but get no rows returned.VB Code:
drParent = dtParent.NewRow() drParent.Item("ID") = "TEST Parent" drChild= dtChild.NewRow() drChild.Item("ID") = "TEST Child" drChild.Item("ParentID") = "TEST Parent"
????
/Edit: I've tried doing drChild.SetParentRow(drParent , relParentChild) but it doesn't work.






Reply With Quote