S
Seth
Hi,
I am having a problem updating a dataset with modified, added, and deleted
rows contained in it. Since this dataset has 4 datarelations (parent-child)
contained in it. The problem I am running into is the different
combinations makes my updating logic (the order I update each table)
different everytime. What I do is pass one by one each table one by one to
a dataadapter which has the insert, update and delete commands and is done
uisng a transaction object. There can nulls in some of the foreign keys
columns in the tables!
For example, when I delete a row in the parent table I must call the update
on that
child table before I call the update on the parent table or I will get a
constraint error. However, if there is an added row in the parent table I
must call the update on the parent table before the child table to remove
the key pointing to that row.
So how do I deal with this? Do I have set flags in my business objects to
set the update order? Or is there a more elgant solution around this?
Thanks
I am having a problem updating a dataset with modified, added, and deleted
rows contained in it. Since this dataset has 4 datarelations (parent-child)
contained in it. The problem I am running into is the different
combinations makes my updating logic (the order I update each table)
different everytime. What I do is pass one by one each table one by one to
a dataadapter which has the insert, update and delete commands and is done
uisng a transaction object. There can nulls in some of the foreign keys
columns in the tables!
For example, when I delete a row in the parent table I must call the update
on that
child table before I call the update on the parent table or I will get a
constraint error. However, if there is an added row in the parent table I
must call the update on the parent table before the child table to remove
the key pointing to that row.
So how do I deal with this? Do I have set flags in my business objects to
set the update order? Or is there a more elgant solution around this?
Thanks