Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating Parent Child Cursor Adpaters
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Updating Parent Child Cursor Adpaters
Miscellaneous
Thread ID:
00984077
Message ID:
00984077
Views:
54
How do you all handle the updating of cursor adapters in a parent child situation where there are RI triggers on the server?

Let's say I have a CA for the OrderHeader and another one for the OrderDetail..
And there are RI constraints on the server between the OrderHeader and the OrderDetail..

If I was dealing just with inserts, I would want to tableupdate the orderheader first, so that the foreign keys would exist when I updated the orderdetail.

If I was dealing just with deletes, I would want to delete the OrderDetail first so that RI would not fail when I deleted the OrderHeader.

What do I do when the orderheader cursor and the orderdetail cursor contains both inserts and deletes?

I could certainly weaken or get rid of the RI constraints.. but that seems like an undesirable solution.

If I have cascading deletes from the orderheader to the orderdetail, and tableupdate the orderheader first, the transaction would still fail when it then tries to tableupdate the orderdetail which contains deletes for the records which now have already been deleted..

I suppose I could just not delete children at the front end when I'm deleting the whole order and let the cascading deletes handle it all..

Does someone have a cleaner solution? (other than not using cursor adapters at all??)
Next
Reply
Map
View

Click here to load this message in the networking platform