![]() Then inserts and updates to parent tables. So I tried the code below as recommended, I structured it to perform the deletes from child tables first. But if I reverse the order of the table adapter update calls so child tables are updated before parent tables then the deletes work but the inserts fail because it can't insert a FK reference into a child if it doesn't first exist in the parent. ![]() Tableadapter_child.Update(dataset.childtable) īut I am getting foreign key reference errors when deleting records because the adapter is trying to delete a row from a parent table but it can't because there is a FK refrence to it in a child table. Tableadapter_parent.Update(dataset.parenttable) ![]() I'm using table adapters to do the CRUD actions. I have a typed-dataset with a dozen or so tables which are hooked together with typical on-to-many and many-to-many relationships.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |