none
MS Sync Framework version RRS feed

  • Question

  • Hi there,

    I'm about to start learing how to work and handle the sync framework. But it seams a bit confusing. I've read that the Sync framework is already included within VS 2010.
    I've got the following qiestions that I wasn't able to find in any FAQs so far:

    1) how can I find out what version of the sync framework is currently installed on my development machine.
    2) If there are newer versions of the framework, how to update Visual Studio with the newest sync framework release ?
    3) Is it also required to update the sync framework on the SQL 2008 Server?
    4) is there any good step-by-step source and examples of how to start with the sync framework (videos and docs I found so far point to ther old sync framework 1.0) - but I'd like to use the newest features like the seamless online/offline mode, SQL based change tracking etc.

    thanks for your help.

     

    Thursday, November 11, 2010 9:44 AM

Answers

  • Sync Fx tracks the changes at the row level and not the column level. even in a conflict, what it gives you is the raw contents of the row from both local and remote.

    you can get away comparing the value of a row before it is applied by querying the row values directly on the destination and comparing it against the dataset of what is about to be applied by sync.

    • Marked as answer by evpwspm Tuesday, April 19, 2011 5:34 PM
    Friday, December 3, 2010 11:47 PM
    Moderator

All replies

  • check the contents of C:\Program Files (x86)\Microsoft Sync Framework, each version will have a folder there. You can install different versions of Sync Fx so don't be surprised to find multiple folders there.

    Sync Fx is released independent of VS so you have to keep track of the Sync Fx release. Note that the Sync Fx version associated with the Local Database Cache designer tool in VS is the offline provider (v1.) check http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/04/27/sync-framework-frequently-asked-questions-faq.aspx

    when you install Sync Fx v2.1,  the documentation contains a step-by-step walkthrough/tutorial for synching database using the offline provider or the collaboration providers.

    Thursday, November 11, 2010 10:34 AM
    Moderator
  • OK, so my current version is v1.0

    if there can be multiple versions, how can I make sure which version will be used in my app?
    Do I need to do anything on the SQL Server side?

    thanks

     

    Thursday, November 11, 2010 1:50 PM
  • just make sure you reference the version you prefer to use in VS studio.

    if you're asking if you need to install anything on the SQL Server side,  no. Please note though that Sync Fx will create sync related objects in your database (trigger, sp, tables)

    Thursday, November 11, 2010 2:35 PM
    Moderator
  •  can you give me an tipp how / where to reference to the wanted version in VS?

    thanks

     

    Thursday, November 11, 2010 2:40 PM
  • not sure about your question. if you found the v1 folder for your Sync Fx install, then you can simply do Add Reference for your project under Solution Explorer in VS.
    Thursday, November 11, 2010 2:44 PM
    Moderator
  • got it - many thanks.

    Thursday, November 11, 2010 8:06 PM
  • I've just got another issue:

    After update to the sync framework 2.1 I'm getting this exception:

    SQL Server Change Tracking has cleaned up tracking information for table 'dbo.myserver_test_table'. To recover from this error, the client must reinitialize its local database and try again.

    now, the question is: How can I reinitialize the local database to get rid of this problem?

    thanks

    Thursday, November 11, 2010 8:19 PM
  • no ideas how to fix this?
    Saturday, November 13, 2010 8:03 AM
  • i dont think there were any updates on sync providers related to SQL Server Change Tracking in v2.1.

    you might want to check the retention period you specified for your change tracking.

    you're client is now out of sync with your server and the easiest way to reinitialize it is to delete and re-create it.

    Friday, November 19, 2010 12:59 AM
    Moderator
  • you're client is now out of sync with your server and the easiest way to reinitialize it is to delete and re-create it.

    This is exacltly the point - what do I need to delete and what/how to re-create to force something such an initial sync.

     

    Sunday, November 21, 2010 11:05 AM
  • delete the table, or change table creation option to drop the existing table  or delete the database itself.
    Monday, November 22, 2010 3:06 PM
    Moderator
  • deleting the local cache did the trick. thanks

    Is there any way to determine which tables and rows were affected by the sync prcoess (means which local table/row caused an upload to the server and which one local table/row was updated with data from server).

    I know syncstats,

     Dim syncStats As Microsoft.Synchronization.Data.SyncStatistics = syncAgent.Synchronize()

    but this only gives me the statistic numbers - instead, I'd like to see the real data content.

    Is there any way to display the changes?

    Wednesday, December 1, 2010 5:38 PM
  • You may want to use events for those info. See http://msdn.microsoft.com/en-US/library/bb726009(v=SQL.90).aspx 

     

    Thanks,


    Ann Tang
    Thursday, December 2, 2010 1:07 AM
  • check the ChangesApplied event. the eventargs will have a Context property that contains datasets
    Thursday, December 2, 2010 12:56 PM
    Moderator
  • Thanks guys - this is the right way but:
    The response I get from the functions is the table/record level that will be or has been synced.

    What I'm looking for is the info about which individual filed within the record really caused the sync.

    Background:

    Sometimes, there are syncs even when data wasn't changed by the user. I'd like to find out not only that this was caused by let's say customer table -> record XYZ, but also to see which field in this record was changed from what to what. (I can already do that during a conflict resolution - works great, but now would be great also for a plain sync w/o conflicts) 

    Ist that possible to find out at all?

     

     

    Friday, December 3, 2010 7:15 PM
  • Sync Fx tracks the changes at the row level and not the column level. even in a conflict, what it gives you is the raw contents of the row from both local and remote.

    you can get away comparing the value of a row before it is applied by querying the row values directly on the destination and comparing it against the dataset of what is about to be applied by sync.

    • Marked as answer by evpwspm Tuesday, April 19, 2011 5:34 PM
    Friday, December 3, 2010 11:47 PM
    Moderator