Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sets the name of the scope to synchronize, which is a logical group of tables with optional filters.
This property is not CLS-compliant.
Namespace: Microsoft.Synchronization.Data.SqlServer
Assembly: Microsoft.Synchronization.Data.SqlServer (in microsoft.synchronization.data.sqlserver.dll)
Syntax
'Declaration
Public Overrides WriteOnly Property ScopeName As String
'Usage
Dim instance As SqlSyncProvider
Dim value As String
instance.ScopeName = value
public override string ScopeName { set; }
public:
virtual property String^ ScopeName {
void set (String^ value) override;
}
/** @property */
public void set_ScopeName (String value)
public override function set ScopeName (value : String)
Property Value
The name of the scope to synchronize.
Example
The following code example specifies the scope for a SqlSyncProvider object by using the DbSyncScopeDescription object, rather than setting ScopeName directly. To view this code in the context of a complete example, see How to: Configure and Execute Collaborative Synchronization (SQL Server).
DbSyncScopeDescription scopeDesc = new DbSyncScopeDescription("filtered_customer");
// Definition for Customer.
DbSyncTableDescription customerDescription =
SqlSyncDescriptionBuilder.GetDescriptionForTable("Sales.Customer", serverConn);
scopeDesc.Tables.Add(customerDescription);
// Definition for CustomerContact, including the list of columns to include.
Collection<string> columnsToInclude = new Collection<string>();
columnsToInclude.Add("CustomerId");
columnsToInclude.Add("PhoneType");
DbSyncTableDescription customerContactDescription =
SqlSyncDescriptionBuilder.GetDescriptionForTable("Sales.CustomerContact", columnsToInclude, serverConn);
scopeDesc.Tables.Add(customerContactDescription);
Dim scopeDesc As New DbSyncScopeDescription("filtered_customer")
' Definition for Customer.
Dim customerDescription As DbSyncTableDescription = _
SqlSyncDescriptionBuilder.GetDescriptionForTable("Sales.Customer", serverConn)
scopeDesc.Tables.Add(customerDescription)
' Definition for CustomerContact, including the list of columns to include.
Dim columnsToInclude As New Collection(Of String)()
columnsToInclude.Add("CustomerId")
columnsToInclude.Add("PhoneType")
Dim customerContactDescription As DbSyncTableDescription = _
SqlSyncDescriptionBuilder.GetDescriptionForTable("Sales.CustomerContact", columnsToInclude, serverConn)
scopeDesc.Tables.Add(customerContactDescription)
See Also
Reference
SqlSyncProvider Class
SqlSyncProvider Members
Microsoft.Synchronization.Data.SqlServer Namespace