OdbcParameter.SourceVersion Właściwość

Definicja

Pobiera lub ustawia wartość DataRowVersion do użycia podczas ładowania 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

Wartość właściwości

Jedna z DataRowVersion wartości. Wartość domyślna to Bieżący.

Implementuje

Przykłady

Poniższy przykład tworzy element OdbcParameter i ustawia niektóre jego właściwości.

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

Uwagi

Parametr SourceVersion jest używany przez UpdateCommand operację Update w celu określenia, czy wartość parametru jest ustawiona na Wartość Bieżąca czy Oryginalna. Dzięki temu klucze podstawowe mogą być aktualizowane.

Ta właściwość jest ustawiona na wersję DataRow używaną przez Item właściwość (DataRow indeksator) lub metodę GetChildRows .

Dotyczy

Zobacz też