Condividi tramite


OleDbParameter.SourceColumn Proprietà

Definizione

Ottiene o imposta il nome della colonna di origine mappata a DataSet e utilizzata per il caricamento o la restituzione di Value.

public:
 virtual property System::String ^ SourceColumn { System::String ^ get(); void set(System::String ^ value); };
public:
 property System::String ^ SourceColumn { System::String ^ get(); void set(System::String ^ value); };
public override string SourceColumn { get; set; }
[System.Data.DataSysDescription("DataParameter_SourceColumn")]
public string SourceColumn { get; set; }
member this.SourceColumn : string with get, set
[<System.Data.DataSysDescription("DataParameter_SourceColumn")>]
member this.SourceColumn : string with get, set
Public Overrides Property SourceColumn As String
Public Property SourceColumn As String

Valore della proprietà

Nome della colonna di origine mappata all'oggetto DataSet. Il valore predefinito è una stringa vuota.

Implementazioni

Attributi

Esempio

Nell'esempio seguente viene creato un oggetto OleDbParameter e vengono impostate alcune delle relative proprietà.

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

Commenti

Quando SourceColumn è impostato su un valore diverso da una stringa vuota, il valore del parametro viene recuperato dalla colonna con il SourceColumn nome. Se Direction è impostato su Input, il valore viene ricavato da DataSet. Se Direction è impostato su Output, il valore viene ricavato dall'origine dati. Un Direction di InputOutput è una combinazione di entrambi.

Per altre informazioni su come usare la proprietà , vedere DataAdapter Parameters and Updating Data Sources with DataAdapters .For more information about how to use the property, see DataAdapter Parameters and Updating Data Sources with DataAdapters.For more information about how to use the SourceColumn property, see DataAdapter Parameters and Updating Data Sources with DataAdapters.

Si applica a

Vedi anche