IDataParameter.SourceColumn IDataParameter.SourceColumn IDataParameter.SourceColumn IDataParameter.SourceColumn Property

定义

获取或设置映射到 DataSet 并且用于加载或返回 Value 的源列的名称。Gets or sets the name of the source column that is mapped to the DataSet and used for loading or returning the Value.

public:
 property System::String ^ SourceColumn { System::String ^ get(); void set(System::String ^ value); };
public string SourceColumn { get; set; }
member this.SourceColumn : string with get, set
Public Property SourceColumn As String

属性值

映射到 DataSet 的源列的名称。The name of the source column that is mapped to the DataSet. 默认值为一个空字符串。The default is an empty string.

示例

下面的示例创建的实现类实例SqlParameter,并设置它的一些属性。The following example creates an instance of the implementing class, SqlParameter, and sets some of its properties.

public void CreateSqlParameter() 
{
    SqlParameter parameter = new SqlParameter(
        "@Description", SqlDbType.VarChar);
    parameter.IsNullable = true;
    parameter.Direction = ParameterDirection.Output;
    parameter.SourceColumn = "Description";
}
Public Sub CreateSqlParameter()
    Dim parameter As New SqlParameter( _
        "@Description", SqlDbType.VarChar)
    parameter.IsNullable = True
    parameter.Direction = ParameterDirection.Output
    parameter.SourceColumn = "Description"
End Sub 

注解

值之间的链接IDataParameterDataTable可能是双向的具体取决于值Direction属性。The link between the value of the IDataParameter and the DataTable may be bidirectional depending on the value of the Direction property.

适用于