locked
Data Synchronize Problem with Microsoft Sync Framework 1.0 RRS feed

  • Question

  • Hello Microsoft Expert,


    We are currently doing Data Synchronize POC with Microsoft Sync Framework 1.0. Everything is running well, but got one stuck on one scenario. Here is the problem replication:

     

    1.       Mast/Detail Table Synchronize (Working properly)

     

    a.       For inserting data in Mast and Detail Table both, it will insert mast table , then insert detail table.

    b.      For Deleting data from Mast and Detail Table, it will delete detail table, then master table.

     

    As my observing, above implement is based on SyncGroup Object. Once Master/Detail tables are set to same SyncGroup, SyncGroup will take the transaction controlling based on PK/FK relationship automatically.

     

    2.       Two Common tables (A and B) with one Link table (AB) (Trouble, Stuck)

     

    I just put above 3 tables in one SyncGroup (Relation between those tables are built correctly in Database). But during Data Synchronize process, it doesn’t work like Point 1. By using SQL Tracing, I figured out that execute sequence like this:

    • Insert Section: Insert A, Insert AB, Insert B
    • Delete Section: Delete B, Delete AB, Delete A

     

    This sequence, it's not my want. I want to rewrite the relationship for those Syntables in SynGroup, but It seems it does not provide any interface for overriding.


    My Question is how to control those relationship in Data Synchronize?  (i did see some tips from website, like you can use table's sequence in SyncTableCollection to do it. I tried all of them like, A, B, AB or AB, A,B. None of them can change the background Data Sync sequence.)


    Could any Microsoft expert help me to solve this issue?


    Appreciate


    Best wishes,

    Feelyn

    Monday, March 16, 2009 2:08 AM

Answers

  • I assume you are using Sync Services for ADO.NET.  If so, can you try to add SyncTable in the order of A, B then AB.  A and B should have no PK/FK dependency.

    Thanks.
    Leo Zhou ------ This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, March 20, 2009 5:20 PM
    Answerer