Export (0) Print
Expand All

SqlCeParameter Constructor (String, SqlDbType, Int32, String)

Initializes a new instance of the SqlCeParameter class with the parameter name, data type, length, and source column name.

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

public SqlCeParameter(
	string name,
	SqlDbType dataType,
	int size,
	string sourceColumn
)

Parameters

name
Type: System.String
The name of the parameter to map.
dataType
Type: System.Data.SqlDbType
One of the SqlDbType values.
size
Type: System.Int32
The length of the parameter.
sourceColumn
Type: System.String
The name of the source column.

Size is inferred from the value of the dataType parameter if it is not explicitly set in the size parameter.

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

SqlCeParameter param = new SqlCeParameter("@Description", SqlDbType.NVarChar,
    88, "Description");
param.IsNullable = true;


Show:
© 2015 Microsoft