OleDbParameter.SourceVersion 属性

定义

获取或设置在加载 DataRowVersion 时使用的 ValueGets or sets the DataRowVersion to use when you load Value.

public:
 virtual property System::Data::DataRowVersion SourceVersion { System::Data::DataRowVersion get(); void set(System::Data::DataRowVersion value); };
public:
 property System::Data::DataRowVersion SourceVersion { System::Data::DataRowVersion get(); void set(System::Data::DataRowVersion value); };
public override System.Data.DataRowVersion SourceVersion { get; set; }
[System.Data.DataSysDescription("DataParameter_SourceVersion")]
public System.Data.DataRowVersion SourceVersion { get; set; }
member this.SourceVersion : System.Data.DataRowVersion with get, set
[<System.Data.DataSysDescription("DataParameter_SourceVersion")>]
member this.SourceVersion : System.Data.DataRowVersion with get, set
Public Overrides Property SourceVersion As DataRowVersion
Public Property SourceVersion As DataRowVersion

属性值

DataRowVersion

DataRowVersion 值之一。One of the DataRowVersion values. 默认值为 CurrentThe default is Current.

实现

属性

例外

该属性未设置为 DataRowVersion 值之一。The property was not set to one of the DataRowVersion values.

示例

下面的示例创建 OleDbParameter 并设置其一些属性。The following example creates an OleDbParameter and sets some of its properties.

Public Sub CreateOleDbParameter()  
    Dim parameter As New OleDbParameter("Description", OleDbType.VarChar, 88)  
    parameter.SourceColumn = "Description"  
    parameter.SourceVersion = DataRowVersion.Current  
End Sub  
public void CreateOleDbParameter()   
 {  
    OleDbParameter parameter = new OleDbParameter("Description", OleDbType.VarChar, 88);  
    parameter.SourceColumn = "Description";  
    parameter.SourceVersion = DataRowVersion.Current;  
 }  

注解

UpdateCommand在更新操作过程中用于确定参数值是否设置为 CurrentOriginalUsed by UpdateCommand during an update operation to determine whether the parameter value is set to Current or Original. 这将允许更新主键。This lets primary keys be updated. 此属性设置为属性使用的的版本 DataRow Item[] ,或 GetChildRows 对象的方法 DataRowThis property is set to the version of the DataRow used by the Item[] property, or the GetChildRows method of the DataRow object.

适用于