Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

RelationalSyncProvider.SyncProviderPosition Property

Gets or sets a SyncProviderPosition enumeration value that represents whether a provider is associated with the local or remote database.

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

public SyncProviderPosition SyncProviderPosition { get; set; }

Property Value

Type: Microsoft.Synchronization.SyncProviderPosition
A SyncProviderPosition enumeration value that represents whether a provider is associated with the local or remote database.

The following code example instantiates local and remote providers and calls the SetupSyncProvider method in a sample class that was created for this documentation. This method is used so that providers can be configured easily for multiple nodes. Several provider commands are specified within this method. For more information about these commands and to view this code in the context of a complete example, see How to: Synchronize Other ADO.NET Compatable Databases.

DbSyncProvider localProvider = new DbSyncProvider();
DbSyncProvider remoteProvider = new DbSyncProvider();

//Create a provider by using the SetupSyncProvider on the sample class.             
sampleSyncProvider.SetupSyncProvider(localProviderConnString, localProvider);
localProvider.SyncProviderPosition = SyncProviderPosition.Local;

sampleSyncProvider.SetupSyncProvider(remoteProviderConnString, remoteProvider);
remoteProvider.SyncProviderPosition = SyncProviderPosition.Remote;


Dim localProvider As New DbSyncProvider()
Dim remoteProvider As New DbSyncProvider()

'Create a provider by using the SetupSyncProvider on the sample class.
sampleSyncProvider.SetupSyncProvider(localProviderConnString, localProvider)
localProvider.SyncProviderPosition = SyncProviderPosition.Local

sampleSyncProvider.SetupSyncProvider(remoteProviderConnString, remoteProvider)
remoteProvider.SyncProviderPosition = SyncProviderPosition.Remote


Show:
© 2015 Microsoft