SqlSyncDescriptionBuilder.GetDescriptionForScope Method
Include Protected Members
Include Inherited Members
Returns a DbSyncScopeDescription object that contains information about a scope that is defined for a SQL Server database.
This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.
Overload List
Name | Description | |
---|---|---|
GetDescriptionForScope(String, SqlConnection) | Returns a DbSyncScopeDescription object that contains information about the specified scope that is defined for a SQL Server database. | |
GetDescriptionForScope(String, String, SqlConnection) | Returns a DbSyncScopeDescription object that contains information about the specified scope that is defined for a SQL Server database. | |
GetDescriptionForScope(String, String, String, SqlConnection) | Returns a DbSyncScopeDescription object that contains information about the specified scope that is defined for a SQL Server database. |
Top
Remarks
The following code example provisions a SQL Server Compact database. Provisioning is based on scope information that is retrieved from the server by calling GetDescriptionForScope and specifying the scope name ("filtered_customer"), the connection, the object prefix name used on the server (null), and the optional database schema in which Sync Framework stores synchronization objects (in this case "Sync"). SQL Server Compact databases do not support separate schemas, so we prefix the name of all synchronization-related objects with "Sync" so that they are easy to identify. To view this code in the context of a complete example, see How To: Execute Database Synchronization (SQL Server).
DbSyncScopeDescription clientSqlCe1Desc = SqlSyncDescriptionBuilder.GetDescriptionForScope("filtered_customer", null, "Sync", serverConn);
SqlCeSyncScopeProvisioning clientSqlCe1Config = new SqlCeSyncScopeProvisioning(clientSqlCe1Conn, clientSqlCe1Desc);
clientSqlCe1Config.ObjectPrefix = "Sync";
clientSqlCe1Config.Apply();
Dim clientSqlCe1Desc As DbSyncScopeDescription = _
SqlSyncDescriptionBuilder.GetDescriptionForScope("filtered_customer", Nothing, "Sync", serverConn)
Dim clientSqlCe1Config As New SqlCeSyncScopeProvisioning(clientSqlCe1Conn, clientSqlCe1Desc)
clientSqlCe1Config.ObjectPrefix = "Sync"
clientSqlCe1Config.Apply()