SqlCeSyncScopeProvisioning Class

Represents the provisioning of a SQL Server Compact database for a particular scope that is represented by a DbSyncScopeDescription object.


Namespace:  Microsoft.Synchronization.Data.SqlServerCe
Assembly:  Microsoft.Synchronization.Data.SqlServerCe (in Microsoft.Synchronization.Data.SqlServerCe.dll)

public ref class SqlCeSyncScopeProvisioning

The SqlCeSyncScopeProvisioning type exposes the following members.

Public methodSqlCeSyncScopeProvisioning() Obsolete. Initializes a new instance of the SqlCeSyncScopeProvisioning class by using default values.
Public methodSqlCeSyncScopeProvisioning(SqlCeConnection)Initializes a new instance of the SqlCeSyncScopeProvisioning class with the specified connection.
Public methodSqlCeSyncScopeProvisioning(DbSyncScopeDescription) Obsolete. Initializes a new instance of the SqlCeSyncScopeProvisioning class for the specified scope.
Public methodSqlCeSyncScopeProvisioning(SqlCeConnection, DbSyncScopeDescription)Initializes a new instance of the SqlCeSyncScopeProvisioning class with the specified connection and scope description.

Public propertyObjectPrefixGets or sets the optional prefix that is used to identify objects that Sync Framework creates.
Public propertyScopeNameGets the name of the scope that this object represents.
Public propertyTablesGets a collection of SqlCeSyncTableProvisioning objects that each represent the provisioning of a database table.
Public propertyUserCommentGets or sets the user comment about the scope.

Public methodApply()Applies the provisioning script over the connection that was specified in the constructor.
Public methodApply(SqlCeConnection) Obsolete. Applies the provisioning script to a SQL Server Compact database over the specified connection.
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodPopulateFromScopeDescriptionSets the scope description from which the database should be provisioned.
Public methodScopeExists(String)Indicates whether the specified scope exists in the database by using the connection previously specified in the constructor.
Public methodScopeExists(String, SqlCeConnection) Obsolete. Returns whether the specified scope exists.
Public methodSetCreateTableDefaultSets whether to create base tables when a scope is configured.
Public methodToString (Inherited from Object.)

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";

Dim clientSqlCe1Desc As DbSyncScopeDescription = _
    SqlSyncDescriptionBuilder.GetDescriptionForScope("filtered_customer", Nothing, "Sync", serverConn)
Dim clientSqlCe1Config As New SqlCeSyncScopeProvisioning(clientSqlCe1Conn, clientSqlCe1Desc)
clientSqlCe1Config.ObjectPrefix = "Sync"

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.