IDataParameter.SourceColumn 属性

定义

获取或设置映射到 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

属性值

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 

注解

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

适用于