GuyFawkes
GuyFawkes

Reputation: 1706

Parent-Child Dataset - Nested Relation: Does not insert new child row

what I have is a DataSet with 1 parent and 1 child table. Relation is nested. Update cascading. Problem is when I add a new child row in UI, the child row is not inserted.

I update like so:

parentTableAdapter.Update(dataSet);

What am I missing?

Upvotes: 0

Views: 812

Answers (1)

GuyFawkes
GuyFawkes

Reputation: 1706

I was just being stupid.

I needed to update the child rows seperatly like so:

childTableAdapter.Update(dataSet);

I tried that but due to my fiddling, the "Update" command from the TableAdapter was somehow missing. So I thought, I only need to Update the parent. I re-added it by selecting "New" as UPDATE, SELECT, DELETE in DataSetDesigner and then just startet the Config-Wizard to fill in the commands.

Upvotes: 0

Related Questions