locked
setting @sync_last_received_anchor RRS feed

  • Question

  • Hello all,

    I have a couple of questions about the anchor mechanism in MSF. When I set the DbServerSyncProvider.SelectNewAnchorCommand property, this new anchor seems to be used as the last anchor during the next sync.

    - where is this value stored?
    - can I change it?

    I've had a look at this sample: http://www.syncguru.com/projects/SyncServicesDemoBuilder.aspx
    It allows specifying a client db. However when I switch to a new client db it doesn't reset the anchor for the new db, and does therefore not synchronize correctly. I'm not sure how I would go about fixing this...

    Thanks
    Ben

    • Moved by Max Wang_1983 Friday, April 22, 2011 9:10 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Saturday, December 22, 2007 7:58 PM

Answers

  •  

    Thanks Ben for the info. please let us know if you see any unexpected or undesired behaviors.

     

    Regards,

     

    Yunwen

    Sunday, December 30, 2007 9:01 PM
    Moderator

All replies

  •  

    the anchor value was stored in the client db as part of the sync metadata. nomally and in most cases, you won't and should not change it since sync will take care of get/set this value during sync time.

     

    about the problem you described about switching to a new db, could you give more details? e.g. where the new db come from ? what is incorrect for the sync? is data not convergent after sync ?

     

    thanks

    Yunwen

    Sunday, December 23, 2007 6:28 PM
    Moderator
  • Hello Yunwen Bai,

    thanks for your help.

    > the anchor value was stored in the client db as part of the sync metadata

    Looks like it's stored in the
    __sysSyncArticles table that vs2008 doesn't show.
    Also ClientSyncProvider has two methods to access the anchor: SetTableSentAnchor and SetTableRecievedAnchor.

    > what is incorrect for the sync?

    Unfortunately I can't reproduce the error anymore. What happened was that when changing to a new database none of the old records where synchronized. Since I can't reproduce this behaviour anymore, I assume it was my fault...

    Thanks
    Ben
    Wednesday, December 26, 2007 2:54 PM
  •  

    Thanks Ben for the info. please let us know if you see any unexpected or undesired behaviors.

     

    Regards,

     

    Yunwen

    Sunday, December 30, 2007 9:01 PM
    Moderator