Visual Studio 2008 Beta 2 Sync Services

It’s taken me a while to get around to exploring what’s new with the Microsoft Sync Services in Beta 2.  Given how far they had got with Beta 1 I half expected this to be pretty much baked.  Unfortunately this is definitely not the case.  Without spending too much time the following issues really prevent the designer from being any use at all.

  • Doesn’t return tables that aren’t in the default dbo schema. This is severely limiting, particularly if you are interested in using either the AdventureWorks or AdventureWorksLT databases as part of your investigation into how the Sync Services work.
  • Tables are not marked as BiDirectional. Despite setting the client option “Data to download” to “New and incremental changes after first synchronization” it appears that all the SyncTables are left with the default value of DownloadOnly. Although this is quite a simple fix, it needs to be done when the syncTables are being initialised.  Luckily the team have fix one bug which means the OnInitialized method does get invoked which you can override in a partial class to set the Direction property of the syncTable to BiDirectional eg:
Partial Public Class LocalDataCache1SyncAgent
    
    'TODO: Add initialization code here. OnInitialized() is invoked after the CTOR is called.
    Private Sub OnInitialized()
        Me._personSyncTable.SyncDirection = Microsoft.Synchronization.Data.SyncDirection.Bidirectional
    End Sub

End Class

Leave a comment