G
Guest
Hello anyone,
The last couple of days I have tried to find the best practice on updating
parent and child rows in a dataset. Ideally I want to allow the dataset to
consist of a mix of modified, deleted and inserted child and/or parent rows.
To make things work well I have turned all cascading options on. This way
when someone deleted the parent de child rows are automaticly deleted aswell.
Furthermore, when my busniess layer decides that validation rules do not
allow the parent to be deleted a rejectchanges on the parent rejects the
child rows as well.
So far so good, but problems arise when the parent and child are both
modifed. When I update the the parent (with success) an implicit Accept
Changes is done ont the parent row which cascades to the child rows which
still needed to be updated to the database.
Using Getchanges and turning of the cascadinf accept reject changes have
given me other problems which I'll not mention for now (unless asked for).
Could anyone tell me how to avoid the implicit acceptchanges on an updated
row or direct me to documents and/or books that go indepth on updating
parent/child datasets imcluding own validation, concurrency control and
cascading options.
Many thanks in advance,
WiZZiX
The last couple of days I have tried to find the best practice on updating
parent and child rows in a dataset. Ideally I want to allow the dataset to
consist of a mix of modified, deleted and inserted child and/or parent rows.
To make things work well I have turned all cascading options on. This way
when someone deleted the parent de child rows are automaticly deleted aswell.
Furthermore, when my busniess layer decides that validation rules do not
allow the parent to be deleted a rejectchanges on the parent rejects the
child rows as well.
So far so good, but problems arise when the parent and child are both
modifed. When I update the the parent (with success) an implicit Accept
Changes is done ont the parent row which cascades to the child rows which
still needed to be updated to the database.
Using Getchanges and turning of the cascadinf accept reject changes have
given me other problems which I'll not mention for now (unless asked for).
Could anyone tell me how to avoid the implicit acceptchanges on an updated
row or direct me to documents and/or books that go indepth on updating
parent/child datasets imcluding own validation, concurrency control and
cascading options.
Many thanks in advance,
WiZZiX