Share via


SqlCeSyncScopeProvisioning.ObjectPrefix Property

Gets or sets the optional prefix that is used to identify objects that Sync Framework creates.

Namespace: Microsoft.Synchronization.Data.SqlServerCe
Assembly: Microsoft.Synchronization.Data.SqlServerCe (in microsoft.synchronization.data.sqlserverce.dll)

Syntax

'Declaration
Public Property ObjectPrefix As String
'Usage
Dim instance As SqlCeSyncScopeProvisioning
Dim value As String

value = instance.ObjectPrefix

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

/** @property */
public void set_ObjectPrefix (String value)
public function get ObjectPrefix () : String

public function set ObjectPrefix (value : String)

Property Value

The prefix that is used to identify objects that Sync Framework creates.

Example

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: Configure and Execute Collaborative Synchronization (SQL Server).

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

See Also

Reference

SqlCeSyncScopeProvisioning Class
SqlCeSyncScopeProvisioning Members
Microsoft.Synchronization.Data.SqlServerCe Namespace