System.Data.SqlClient Namespace SqlParameter Class
Sets or retrieves the name of the column used for the parameter value.
Script |
SqlParameter.SourceColumn [ = strName ] |
strName |
The name of the source column mapped to the DataSet and used for loading or returning the Value of the SqlParameter. |
The property is read/write with no default value.
IDataParameter.SourceColumn
The link betwen the value of the SqlParameter and the DataTable may be bidirectional depending on the value of the Direction property.
The following example initializes an SqlParameter and sets some of its properties.
public void CreateSqlParameter ( ) {
SqlParameter myParam = new SqlParameter ( "@Description", SqlDbType.VarChar, 100 );
myParam.SourceColumn = "Description";
myParam.Direction = ParameterDirection.Output;
}
Public Sub CreateSqlParameter ( )
Dim myParam As New SqlParameter ( "@Description", SqlDbType.VarChar, 100 )
myParam.SourceColumn = "Description"
myParam.Direction = ParameterDirection.Output
End Sub |
|
C# |
VB |
SqlParameter Members