Our central database should be synchronized in hub and speech mode.
We need to be able to split the data so that client data is replicated locally only to that client.
Has anyone encountered this problem?
MSF provides synchronization areas - table declarations should be separated, with the ability to specify a filtercolumn and filter clause, but there seems to be no way to pass a parameter (for example, clientID) to the filter.
Here is an example from the msdn documentation:
' Create a scope named "filtered_customer", and add two tables to the scope.
' GetDescriptionForTable gets the schema of each table, so that tracking
' tables and triggers can be created for that table.
Dim scopeDesc As New DbSyncScopeDescription("filtered_customer")
scopeDesc.Tables.Add(SqlSyncDescriptionBuilder.GetDescriptionForTable("Customer", serverConn))
scopeDesc.Tables.Add(SqlSyncDescriptionBuilder.GetDescriptionForTable("CustomerContact", serverConn))
' Create a provisioning object for "filtered_customer" and specify that
' base tables should not be created (They already exist in SyncSamplesDb_SqlPeer1).
Dim serverConfig As New SqlSyncScopeProvisioning(scopeDesc)
serverConfig.CreateTableDefault = DbSyncCreationOption.Skip
' Specify which column(s) in the Customer table to use for filtering data,
' and the filtering clause to use against the tracking table.
' "[side]" is an alias for the tracking table.
serverConfig("Customer").AddFilterColumn("CustomerType")
serverConfig("Customer").FilterClause = "[side].[CustomerType] = 'Retail'"
' Configure the scope and change tracking infrastructure.
serverConfig.Apply(serverConn)
Our problem is that we need the filter to except clientID as a run-time parameter.
Is this supported by MSF?
, - filterclause clientID. , ... ?
- , SqlSyncScopeProvisioning , ?
, MSF , , SqlSyncScopeProvisioning .