System.Data.SqlClient Namespace SqlParameter Class
Initializes a new instance of the SqlParameter class. This is the default constructor.
[ VB ]
Overloads Public Sub New ( )
[ C# ]
public SqlParameter ( );
[ C++ ]
public: SqlParameter ( );
[ JScript ]
public function SqlParameter ( );
The following example initializes an SqlParameter using this constructor and sets some of its properties.
public void CreateSqlParameter ( ) {
SqlParameter myParam = new SqlParameter ( );
myParam.ParameterName = "Description";
myParam.SqlDbType = SqlDbType.VarChar;
myParam.Direction = ParameterDirection.Output;
myParam.Size = 100;
}
Public Sub CreateSqlParameter ( )
Dim myParam As New SqlParameter ( )
myParam.ParameterName = "Description"
myParam.SqlDbType = SqlDbType.VarChar
myParam.Direction = ParameterDirection.Output
myParam.Size = 100
End Sub |
|
C# |
VB |
SqlParameter Members SqlParameter Constructor Overload List