OleDbParameter.SourceVersion OleDbParameter.SourceVersion OleDbParameter.SourceVersion OleDbParameter.SourceVersion Property

Definition

Gets 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); };
[System.Data.DataSysDescription("DataParameter_SourceVersion")]
public override System.Data.DataRowVersion SourceVersion { get; set; }
member this.SourceVersion : System.Data.DataRowVersion with get, set
Public Overrides Property SourceVersion As DataRowVersion

Property Value

One of the DataRowVersion values. The default is Current.

Implements

Exceptions

Examples

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;  
 }  

Remarks

Used by UpdateCommand during an update operation to determine whether the parameter value is set to Current or Original. This lets primary keys be updated. This property is set to the version of the DataRow used by the Item[String, DataRowVersion] property, or the GetChildRows method of the DataRow object.

Applies to

See also