DbParameter.SourceColumn 属性

定义

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

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

属性值

String

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

实现

注解

如果 SourceColumn 将设置为空字符串以外的任何值,则会从名称为的列中检索参数的值 SourceColumnWhen SourceColumn is set to anything other than an empty string, the value of the parameter is retrieved from the column with the SourceColumn name. 如果 Direction 设置为 Input ,则从中获取值 DataSetIf Direction is set to Input, the value is taken from the DataSet. 如果 Direction 设置为 Output ,则从数据源中获取值。If Direction is set to Output, the value is taken from the data source. DirectionInputOutput 是两者的组合。A Direction of InputOutput is a combination of both.

有关如何使用属性的详细信息 SourceColumn ,请参阅 DataAdapter 参数使用 dataadapter 更新数据源For more information about how to use the SourceColumn property, see DataAdapter Parameters and Updating Data Sources with DataAdapters.

适用于