DbSyncAdapter.RowIdColumns 屬性
取得構成資料表中每個資料列之唯一識別碼的資料行名稱集合。
命名空間: Microsoft.Synchronization.Data
組件: Microsoft.Synchronization.Data (在 microsoft.synchronization.data.dll)
語法
'宣告
Public ReadOnly Property RowIdColumns As Collection(Of String)
'用途
Dim instance As DbSyncAdapter
Dim value As Collection(Of String)
value = instance.RowIdColumns
public Collection<string> RowIdColumns { get; }
public:
property Collection<String^>^ RowIdColumns {
Collection<String^>^ get ();
}
/** @property */
public Collection<String> get_RowIdColumns ()
public function get RowIdColumns () : Collection<String>
屬性值
構成資料表中每個資料列之唯一識別碼的資料行名稱集合。
範例
下列程式碼範例會建立 Customer
資料表的 SyncAdapter
物件,並指定要使用 CustomerId
資料行來識別資料表中的每個資料列。
DbSyncAdapter adapterCustomer = new DbSyncAdapter("Customer");
//Specify the primary key, which Sync Framework uses
//to identify each row during synchronization.
adapterCustomer.RowIdColumns.Add("CustomerId");
Dim adapterCustomer As New DbSyncAdapter("Customer")
'Specify the primary key, which Sync Framework uses
'to identify each row during synchronization.
adapterCustomer.RowIdColumns.Add("CustomerId")
請參閱
參考
DbSyncAdapter 類別
DbSyncAdapter 成員
Microsoft.Synchronization.Data 命名空間