SqlCeSyncScopeProvisioning Class
Represents the provisioning of a SQL Server Compact database for a particular scope that is represented by a DbSyncScopeDescription object.
Inheritance Hierarchy
System.Object
Microsoft.Synchronization.Data.SqlServerCe.SqlCeSyncScopeProvisioning
Namespace: Microsoft.Synchronization.Data.SqlServerCe
Assembly: Microsoft.Synchronization.Data.SqlServerCe (in Microsoft.Synchronization.Data.SqlServerCe.dll)
Syntax
'Declaration
Public Class SqlCeSyncScopeProvisioning
'Usage
Dim instance As SqlCeSyncScopeProvisioning
public class SqlCeSyncScopeProvisioning
public ref class SqlCeSyncScopeProvisioning
type SqlCeSyncScopeProvisioning = class end
public class SqlCeSyncScopeProvisioning
The SqlCeSyncScopeProvisioning type exposes the following members.
Constructors
Name | Description | |
---|---|---|
SqlCeSyncScopeProvisioning() | Obsolete. Initializes a new instance of the SqlCeSyncScopeProvisioning class by using default values. | |
SqlCeSyncScopeProvisioning(SqlCeConnection) | Initializes a new instance of the SqlCeSyncScopeProvisioning class with the specified connection. | |
SqlCeSyncScopeProvisioning(DbSyncScopeDescription) | Obsolete. Initializes a new instance of the SqlCeSyncScopeProvisioning class for the specified scope. | |
SqlCeSyncScopeProvisioning(SqlCeConnection, DbSyncScopeDescription) | Initializes a new instance of the SqlCeSyncScopeProvisioning class with the specified connection and scope description. |
Top
Properties
Name | Description | |
---|---|---|
ObjectPrefix | Gets or sets the optional prefix that is used to identify objects that Sync Framework creates. | |
ScopeName | Gets the name of the scope that this object represents. | |
Tables | Gets a collection of SqlCeSyncTableProvisioning objects that each represent the provisioning of a database table. | |
UserComment | Gets or sets the user comment about the scope. |
Top
Methods
Name | Description | |
---|---|---|
Apply() | Applies the provisioning script over the connection that was specified in the constructor. | |
Apply(SqlCeConnection) | Obsolete. Applies the provisioning script to a SQL Server Compact database over the specified connection. | |
Equals | (Inherited from Object.) | |
Finalize | (Inherited from Object.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
MemberwiseClone | (Inherited from Object.) | |
PopulateFromScopeDescription | Sets the scope description from which the database should be provisioned. | |
ScopeExists(String) | Indicates whether the specified scope exists in the database by using the connection previously specified in the constructor. | |
ScopeExists(String, SqlCeConnection) | Obsolete. Returns whether the specified scope exists. | |
SetCreateTableDefault | Sets whether to create base tables when a scope is configured. | |
ToString | (Inherited from Object.) |
Top
Examples
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()
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.