Sync Anchors Sql Ce Desktop 3.5 RRS feed

  • Question


    Hi all!

    I've built the application that syncrhonize the sql server 2005 database with the Sql Ce 3.5 Desktop databases with VS 2008 and Vb.net.

    Now i need to preview data from the Sql ce database before the sync session to display what rows will be selected for the synchronization.

    I guess the sync architecture of Sql Ce database is based on few tables added during the fist synchronisation like __sysSyncArticles or __sysSyncSubscriptions and hidden columns added to each table __sysChangeTxBsn and __sysInsertTxBsn. Well, i just guess...

    How can i compare the ReceivedAnchor and SentAnchor values (datatype is image) and the __sysChangeTxBsn and __sysInsertTxBsn columns (datatype is bigint)? I tryed the cast functions but did not find any coherence.

    Any idea about the sync Sql Ce architecture?

     It seems difficult to manage metadata  on the local data store...

    thanks in advance

    • Moved by Max Wang_1983 Friday, April 22, 2011 8:28 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Friday, March 7, 2008 5:10 PM

All replies

  • while I understand those values are very useful for debugging purpose, but what issue do you have that you need to look into such tracking values used by the sync internally ?


    both sentAnchor ( used for tracking local changes to server ) and receivedAnchor ( from server, used to getdata from server ) are searilized values of those anchor values. the __xxTxBsn is the SSCE internal transaction sequential numbers while received Anchor is the value you get in your selectNewAchor command at the server provider.


    we are working to provide tracing support to get those values during a sync to support user trouble-shooting. Meanwhile, I guess you can using the binaryFormatter to desearilize the value you got from the debugger.


    also, would you kindly let us know you main purpose to chech those values ? we are glad to provide help if needed.




    Sunday, March 9, 2008 2:03 AM
  • Thanks for the reply.

    Well, i was asked to create the option for the sync application to preview  the data that is going to be synchronized. At one hand, this option was originally available in the transfert application and the clients are used to see what data is going to be sent to the server. On the other hand, i've seen some conflicts that may be created durring the syncsession due to the relational database architecture. So sometimes data can be lost even if the conflict is resolved, some kind of conflicts needs to be ignored simply, because there is not other option, the only one thing to do is to do dummy update of ignored rows to get them available for the next sync session. So i was asked to prevent client of the amount of data to exchange, to show wich data groups will be exchanged and  eventual conflicts,


    I have also an other question:

    The other thing is that i was asked to filter data inside the same table, i know that there is the possibility to specify the filter for the syncAdapter. 

    The situation: i need to specify the filter to select data for the sync session 1. The next time if i do not specify the filter, as i understand, the rows wich ware included into the session1 are already synchronized, but the rows wich have not been included into the session 1 and wich are also new or changed before the session 1 should be selected for the sync session 2. So how the syncframework will handle this situation? Will i get my changes for the second sync or it will be ignored?

    The reason of this kind of situation, and i don't have the aswer yet if it is possible or not, that the client is used to select him self the data that is going to be sent to the server, or he can just send everything, he has a choice. For example, the orders and order details, the client would like to choose if he is sending the order now or later, or just send everything. So if the client choose not to send the order1 and send the order 2 to the server, the next time if he will not choose the filter, the order1 should be sent to the server . If the framework will not handle this kind of situation, the only thing i have to do is 1.Get the local data that should be selected without the filter,

    2. If the filter specified, after the sync session, the data wich is not sent according to the filter but wich would be selected without the filter must be dummy updated.

    3.So the next time,if the client choose to synchronise everything, the data excluded from previous session and new changes will be included into the sync session.

    Monday, March 10, 2008 9:24 AM
  • I also wonder if there is a way to make the syncframework sync session 1 filtered data after Session 2 filtered data?

    I think this is a verry common senario.



    Wednesday, March 12, 2008 9:32 PM
  • Is it possible to do this with SQL Server 2008 Change Tracking?



    Wednesday, March 12, 2008 9:34 PM
  • So,

    as godzilla9 said, it is a common scenario, but nobody has un idea of the solution? What do you guys do in this case?


    Friday, March 14, 2008 1:29 PM