SqlCeSyncProvider::Connection Property

Gets or sets the IDbConnection object that is used to connect to the client database.

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

public:
virtual property IDbConnection^ Connection {
	IDbConnection^ get () override;
	void set (IDbConnection^ value) override;
}

Property Value

Type: System.Data::IDbConnection
The IDbConnection object that is used to connect to the client database.

ExceptionCondition
ArgumentException

value has an invalid connection string.

When setting this property, it is recommended to pass a connection object that has never been opened. Sync Framework clones the connection object that you pass; passing a previously opened connection can result in some properties, such as the database password, not being set correctly.

Show: