dotConnect for SQL Server Documentation
Devart.Data.SqlServer Namespace / SqlParameter Class / SqlParameter Constructor / SqlParameter Constructor()
Example

SqlParameter Constructor()
Initializes a new instance of the SqlParameter class.
Syntax
'Declaration
 
Public Function New()
 
Remarks
The base constructor initializes all fields to their default values.
Example
The following example creates a new SqlParameter and sets some of its properties.
public void CreateSqlParameter()
{
  SqlParameter myParameter = new SqlParameter();
  myParameter.ParameterName = "DName";
  myParameter.SqlType = SqlType.VarChar;
  myParameter.Direction = ParameterDirection.Input;
  myParameter.Size = 15;
}
Public Sub CreateSqlParameter()
  Dim myParameter As New SqlParameter()
  myParameter.ParameterName = "DName"
  myParameter.SqlType = SqlType.VarChar
  myParameter.Direction = ParameterDirection.Input
  myParameter.Size = 15
End Sub
See Also