Not
Åtkomst till denna sida kräver auktorisation. Du kan prova att logga in eller byta katalog.
Åtkomst till denna sida kräver auktorisation. Du kan prova att byta katalog.
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)
Syntax
'Declaration
Public Overrides Property Connection As IDbConnection
Get
Set
'Usage
Dim instance As SqlCeSyncProvider
Dim value As IDbConnection
value = instance.Connection
instance.Connection = value
public override IDbConnection Connection { get; set; }
public:
virtual property IDbConnection^ Connection {
IDbConnection^ get () override;
void set (IDbConnection^ value) override;
}
abstract Connection : IDbConnection with get, set
override Connection : IDbConnection with get, set
override function get Connection () : IDbConnection
override function set Connection (value : IDbConnection)
Property Value
Type: System.Data.IDbConnection
The IDbConnection object that is used to connect to the client database.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentException | value has an invalid connection string. |
Remarks
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.