Do the DbSyncScopeDescriptions need to be identical for two SyncProviders to be synced?

Bloccato Do the DbSyncScopeDescriptions need to be identical for two SyncProviders to be synced?

  • 6. prosince 2009 13:02
     
     

    I have seen many examples where a single DbSyncScopeDescription has been provisioned to both to the server and the client. In my scenario this presents problems because the database schemas are not identical. As an example, I have a CustomerId field on the server which I use in a filter to ensure that each client syncs data for only a single Customer. This field does not exist in the client tables - I store the CustomerId in some database level metadata.

    Applying the DbSyncScopeDescription that I used on the server to the client results in an error because the CustomerId field that I used in the filter does not exist on the client.

    Should I build from scratch one DbSyncScopeDescription for the server and then another for the DbSyncScopeDescription?

    How are fields mapped between the two providers in this case? Do the fieldnames need to be the same for this to work? Are there any other restrictions on two database schemas that should be synchronized?

    Many thanks,

    Scott


    MCSD.Net
    • Přesunutý Max Wang_Chinasoft 20. dubna 2011 0:13 Forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    •  

Všechny reakce

  • 7. prosince 2009 5:22
    Vlastník
     
     Odpovědět
    You need to have the filter column on both the 2 peers. However the schemas can be different for other non-filter columns.
    This posting is provided AS IS with no warranties, and confers no rights
  • 16. prosince 2009 20:33
     
     

    Thanks Mahesh,

    The documentation is still pretty thin but it looks as though this class would be useful in mapping columns within different names.

    SyncColumnMapping
    http://msdn.microsoft.com/en-us/library/microsoft.synchronization.data.server.synccolumnmapping.aspx

    Can you give any tips on how one might use this class?

    Thanks,

    Scott


    MCSD.Net
  • 17. prosince 2009 19:53
    Přispěvatel
     
     Odpovědět
    If the column doesn't exist on some clients, before applying, the column can be dropped from the DbSyncScopeDescription first.
    The SyncColumnMapping is for offline scenario which doesn't apply to your situation. Collaboration providers needs same column names on different sides.

    • Označen jako odpověď Scott Munro 17. prosince 2009 22:32
    •