OdbcParameter.SourceVersion 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
當你載入Value時,會取得或設定DataRowVersion要使用的 。
public:
property System::Data::DataRowVersion SourceVersion { System::Data::DataRowVersion get(); void set(System::Data::DataRowVersion value); };
public:
virtual property System::Data::DataRowVersion SourceVersion { System::Data::DataRowVersion get(); void set(System::Data::DataRowVersion value); };
public System.Data.DataRowVersion SourceVersion { get; set; }
public override System.Data.DataRowVersion SourceVersion { get; set; }
member this.SourceVersion : System.Data.DataRowVersion with get, set
Public Property SourceVersion As DataRowVersion
Public Overrides Property SourceVersion As DataRowVersion
屬性值
這是其中一項 DataRowVersion 價值。 預設為「當前」。
實作
範例
以下範例建立 並 OdbcParameter 設定其部分性質。
Public Sub CreateOdbcParameter()
Dim parameter As New OdbcParameter("Description", OdbcType.VarChar, 88)
parameter.SourceColumn = "Description"
parameter.SourceVersion = DataRowVersion.Current
End Sub
public void CreateOdbcParameter()
{
OdbcParameter parameter = new OdbcParameter("Description", OdbcType.VarChar, 88);
parameter.SourceColumn = "Description";
parameter.SourceVersion = DataRowVersion.Current;
}
備註
在操作Update過程中,使用 參數SourceVersionUpdateCommand值是設定為 Current 還是 Original。 這讓主鍵可以被更新。
此屬性被設定為屬性(索引器GetChildRows)DataRow或方法所使用的Item版本DataRow。