I have a relational role table, which is a tree structure
ID [INT] AUTO INCREMENT Name [VARCHAR] ParentID [INT]
I use ADO.NET DataTable and DataAdapter to load and save values ββin this table. This works if I only create children from existing rows. If I create a child row, then create a child of this child, and then Update, the temporary identifier value generated by the DataTable will go into the ParentID column. I have the following set of data relationships:
dataset.Relations.Add(New DataRelation("RoleToRole",RoleTable.Columns("ID"), RoleTable.Columns("ParentID")))
And when I make new child rows in a DataTable, I call the SetParentRow method
newRow.SetParentRow(parentRow)
Is there anything special I need to do to generate identifier generation recursively when I call Update on the DataAdapter?
source share