Share via


SqlSyncScopeProvisioning.ObjectSchema Property

Gets or sets the database schema in which Sync Framework creates objects.

Namespace: Microsoft.Synchronization.Data.SqlServer
Assembly: Microsoft.Synchronization.Data.SqlServer (in microsoft.synchronization.data.sqlserver.dll)

Syntax

'Declaration
Public Property ObjectSchema As String
'Usage
Dim instance As SqlSyncScopeProvisioning
Dim value As String

value = instance.ObjectSchema

instance.ObjectSchema = value
public string ObjectSchema { get; set; }
public:
property String^ ObjectSchema {
    String^ get ();
    void set (String^ value);
}
/** @property */
public String get_ObjectSchema ()

/** @property */
public void set_ObjectSchema (String value)
public function get ObjectSchema () : String

public function set ObjectSchema (value : String)

Property Value

The database schema in which Sync Framework creates objects.

Example

The following code example provisions a SQL Server database. Provisioning is based on scope information that is retrieved from a SQL Server Compact database by calling GetDescriptionForScope and specifying the scope name ("filtered_customer"), the optional object prefix name used in the SQL Server Compact database (in this case "Sync"), and the connection. 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. For the SQL Server database, we specify the optional database schema in which Sync Framework stores synchronization objects (in this case "Sync", but the value is not required to match the object prefix). To view this code in the context of a complete example, see How to: Configure and Execute Collaborative Synchronization (SQL Server).

DbSyncScopeDescription clientSqlDesc = SqlCeSyncDescriptionBuilder.GetDescriptionForScope("filtered_customer", "Sync", clientSqlCe1Conn);
SqlSyncScopeProvisioning clientSqlConfig = new SqlSyncScopeProvisioning(clientSqlDesc);
clientSqlConfig.ObjectSchema = "Sync";
clientSqlConfig.Apply(clientSqlConn);
Dim clientSqlDesc As DbSyncScopeDescription = _
    SqlCeSyncDescriptionBuilder.GetDescriptionForScope("filtered_customer", "Sync", clientSqlCe1Conn)
Dim clientSqlConfig As New SqlSyncScopeProvisioning(clientSqlDesc)
clientSqlConfig.ObjectSchema = "Sync"
clientSqlConfig.Apply(clientSqlConn)

See Also

Reference

SqlSyncScopeProvisioning Class
SqlSyncScopeProvisioning Members
Microsoft.Synchronization.Data.SqlServer Namespace