I am after a bit of best practice advise on updating a dataset with two tables.

I have a cascade delete rule set up on the database tables and the typed dataset tables, so when I delete a customer in my application any corresponding orders are deleted - fine. But when I come to sync with the database, the customer is deleted first (which triggers a cascade delete in the DB) then it attempts to delete the orders that have just been deleted from the cascade and throws an error.

What is the best thing to do because I don't really want to switch off cascade deletes on the dataset as my app wont reflect the current state of play and I dont want to switch off on the database as another app connecting to it may leave some orphaned order data.

Thanks