Results 1 to 2 of 2

Thread: Dataset Sync Issues

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    stoke-on-trent,staffs,uk
    Posts
    2

    Dataset Sync Issues

    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

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Dataset Sync Issues

    When you do the sync (whatever you meant by that), delete the orders first - then the customers.

    Alternatively, ignore that error while deleting data from orders.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width