Microsoft Sync Framework FilterClause with stored procedure not working as expected RRS feed

  • Question

  • Hello,

    i am using the Microsoft Sync Framework for syncing x clients with a server. This is working very well. Now i want to filter the data of one table.
    So i've defined the following filter:


    FilterClause = "[side].[PK_OBJ] IN (SELECT PK_OBJ FROM filter_function(@PARAMETER))";

    The the stored procedure "filter_function" returns IDs by the current configuration.

    After provisioning, the table is synced correctly. In the client database are only rows with IDs returned by the "filter_function".

    The problem:
    If i change the configuration, the "filter_function" will return another result set of IDs. But after synchronization, the new IDs are not in the client-database.
    I have to do a de-provisioning and a provisioning. Then the rows will synced correctly. Whats wrong with this approach? Why this is not working? Thank you.
    Saturday, August 1, 2015 7:55 AM

All replies

  • Sync Fx doesn't support rows going in and out of scope dynamically (partition realignment).

    for example, let's say you have salesman table and territory table.

    you then create a table salesman_territory to store territories that a salesman is assigned to.

    you then sync the 3 tables, on first sync, this will work since the records are not on the destination yet.

    now you decide to add/remove territories from salesman.

    the table that was changed is the salesman_territory table. 

    if a salesman is added a territory it has not synched before, that territory will not get synched since it's the salesman_territory table that changed, not the territory table.

    Sync Fx does change tracking at the table level, no change recorded for the table, no change will be detected for sync.

    Monday, August 10, 2015 8:34 AM