Modifica

Condividi tramite


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

Property Value

One of the DataRowVersion values. The default is Current.

Implements

Attributes

Exceptions

The property was not set to one of the DataRowVersion values.

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[] property, or the GetChildRows method of the DataRow object.

Applies to

See also