G
Guest
Hello,
On page 786 of the ADO.NET Core Reference (chapter 11 - Advanced Updating
Scenarios), David Sceppa gives the basic steps for submitting hierarchical
changes (paraphrased):
1. Submit new master rows
2. Submit new detail rows
3. Submit modified master rows
4. Submit modified detail rows
5. Submit deleted detail rows
6. Submit deleted master rows
I took this process and applied it to a rather large, normalized data
structure. However, the modified detail row changes would never make it to
the database.
I stepped through the code and found that after updating the modified master
rows (step 3), the related detail rows' RowState would change from Modified
to Unchanged. This, of course, keeps the detail rows from being sent to the
database.
After swapping steps 3 and 4, the database was successfully updated. My
questions...why does that happen in the first place? Will swapping steps 3
and 4 have some other adverse effect?
Thank you!
Eric
On page 786 of the ADO.NET Core Reference (chapter 11 - Advanced Updating
Scenarios), David Sceppa gives the basic steps for submitting hierarchical
changes (paraphrased):
1. Submit new master rows
2. Submit new detail rows
3. Submit modified master rows
4. Submit modified detail rows
5. Submit deleted detail rows
6. Submit deleted master rows
I took this process and applied it to a rather large, normalized data
structure. However, the modified detail row changes would never make it to
the database.
I stepped through the code and found that after updating the modified master
rows (step 3), the related detail rows' RowState would change from Modified
to Unchanged. This, of course, keeps the detail rows from being sent to the
database.
After swapping steps 3 and 4, the database was successfully updated. My
questions...why does that happen in the first place? Will swapping steps 3
and 4 have some other adverse effect?
Thank you!
Eric