Upraviť

Zdieľať cez


OdbcParameter.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; }
public System.Data.DataRowVersion SourceVersion { get; set; }
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

Examples

The following example creates an OdbcParameter and sets some of its properties.

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

Remarks

The SourceVersion is used by UpdateCommand during an Update operation to determine whether the parameter value is set to Current or Original. This allows primary keys to be updated.

This property is set to the version of the DataRow used by either the Item property (DataRow indexer), or the GetChildRows method.

Applies to

See also