locked
ServerSyncProvider GetChanges Anchor values for each table in a SyncGroup RRS feed

  • Question

  •  

    Hello,

     

     Can I have Anchors for each table in a Sync Group? So far, I have been creating a Sync Group for each table.\\

     

    Thanks,

     

    Sarav

    • Moved by Max Wang_1983 Thursday, April 21, 2011 11:58 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Wednesday, January 28, 2009 7:53 PM

Answers

  • the anchor value is controled at the sync group level, i.e. all tables in the same group has the same anchor value.

     

    if you really need different table to have different anchor value so changes can be enumerated based on different anchor, you will need to put them in different sync group. but I still cannot see a clear need for this.

     

    thanks

    Yunwen

     

    Friday, January 30, 2009 1:00 AM
    Moderator

All replies

  • what is the purpose to have each table with its own anchor ?

     

    thanks

    Yunwen

     

    Thursday, January 29, 2009 9:32 PM
    Moderator
  •  

    So, that each table can have a difference synchronization point to determine changes.

     

    -Sarav

    Thursday, January 29, 2009 9:36 PM
  • the anchor value is controled at the sync group level, i.e. all tables in the same group has the same anchor value.

     

    if you really need different table to have different anchor value so changes can be enumerated based on different anchor, you will need to put them in different sync group. but I still cannot see a clear need for this.

     

    thanks

    Yunwen

     

    Friday, January 30, 2009 1:00 AM
    Moderator
  • The concept about an anchor is to make sure you can start tracking changes from a certain point. Now, it would make more sense for me to have a tracking point at the table level since each set of data may have different references to their changes. Setting at the group level means I have to track all my sets of data by one reference point. That may work for certain scenarios but I see this as a limitation.

    -Sarav
    Monday, February 2, 2009 9:05 PM
  • I have related question. 

    I did filtering for my sync process and it works fine only after 1st syncronization, but before it when I run client to sync with server it gets all the data disregarding my filter. 

    maybe some changes in anchor will help me? here's a code I use


      SqlCommand selectNewAnchorCommand = new SqlCommand();
            string newAnchorVariable = "@" + SyncSession.SyncNewReceivedAnchor;
            selectNewAnchorCommand.CommandText =
                "SELECT " + newAnchorVariable + " = change_tracking_current_version()";
            selectNewAnchorCommand.Parameters.Add(newAnchorVariable, SqlDbType.BigInt);
            selectNewAnchorCommand.Parameters[newAnchorVariable].Direction = ParameterDirection.Output;
            selectNewAnchorCommand.Connection = serverConn;
            this.SelectNewAnchorCommand = selectNewAnchorCommand;


    thanks!

    C# developer
    Wednesday, August 19, 2009 11:41 PM