N
nuno braga via .NET 247
Hi,
Having read Microsoft ADO .Net from David Sceppa, i come across an way to partially solve the order problem when updating a dataset that has hierarchical data.
I've followed David Sceppa's suggestion in page 486:
1) submit new parent records
2) submit new child records
3) submit modified parent records
4) submit modified child records
5) submit deleted child records
6) submit deleted parent records
nevertheless i've found (as yet) a problem.. what if we:
1) Delete a record
2) Add a new record but with the same key of the previouslly deleted record.
When commiting to the database we get a constraint error of course.. But modifying the order in wich the submitting is made doesn't seem to be a good ideia..
Is there any workarround someone could suggest?
Any help would be appreciated, thanks
Having read Microsoft ADO .Net from David Sceppa, i come across an way to partially solve the order problem when updating a dataset that has hierarchical data.
I've followed David Sceppa's suggestion in page 486:
1) submit new parent records
2) submit new child records
3) submit modified parent records
4) submit modified child records
5) submit deleted child records
6) submit deleted parent records
nevertheless i've found (as yet) a problem.. what if we:
1) Delete a record
2) Add a new record but with the same key of the previouslly deleted record.
When commiting to the database we get a constraint error of course.. But modifying the order in wich the submitting is made doesn't seem to be a good ideia..
Is there any workarround someone could suggest?
Any help would be appreciated, thanks