System.Data.SqlClient Namespace SqlParameter Class
Sets or retrieves the name of the parameter.
Script |
SqlParameter.ParameterName [ = strName ] |
The property is read/write with no default value.
IDataParameter.ParameterName
The ParameterName is specified in the form @paramname. You must set ParameterName before executing an SqlCommand that relies on parameters.
The following example initializes an SqlParameter and sets some of its properties.
public void CreateSqlParameter ( ) {
SqlParameter myParam = new SqlParameter ( "@Description", SqlDbType.VarChar, 100 );
myParam.Direction = ParameterDirection.Output;
}
Public Sub CreateSqlParameter ( )
Dim myParam As New SqlParameter ( "@Description", SqlDbType.VarChar, 100 )
myParam.Direction = ParameterDirection.Output
End Sub |
|
C# |
VB |
SqlParameter Members