Share via


SqlCeParameter Constructor (String, SqlDbType)

Initializes a new instance of the SqlCeParameter class with the parameter name and data type.

Namespace:  System.Data.SqlServerCe
Assembly:  System.Data.SqlServerCe (in System.Data.SqlServerCe.dll)

Syntax

'Declaration
Public Sub New ( _
    name As String, _
    dataType As SqlDbType _
)
'Usage
Dim name As String
Dim dataType As SqlDbType

Dim instance As New SqlCeParameter(name, dataType)
public SqlCeParameter(
    string name,
    SqlDbType dataType
)
public:
SqlCeParameter(
    String^ name, 
    SqlDbType dataType
)
new : 
        name:string * 
        dataType:SqlDbType -> SqlCeParameter
public function SqlCeParameter(
    name : String, 
    dataType : SqlDbType
)

Parameters

Remarks

The data type and, if appropriate, Size and Precision are inferred from the value of the dataType parameter.

Examples

The following example creates a SqlCeParameter and sets some of its properties.

Dim param As New SqlCeParameter("@Description", SqlDbType.NVarChar)
param.Value = "garden hose"
SqlCeParameter param = new SqlCeParameter("@Description", SqlDbType.NVarChar);
param.Value = "garden hose";

See Also

Reference

SqlCeParameter Class

SqlCeParameter Members

SqlCeParameter Overload

System.Data.SqlServerCe Namespace