Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SqlCeParameterCollection.Add Method (String, SqlDbType, Int32, String)

Adds a SqlCeParameter to the SqlCeCommand given the parameter name, data type, column width, and source column name.

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

public SqlCeParameter Add(
	string parameterName,
	SqlDbType type,
	int size,
	string sourceColumn
)

Parameters

parameterName
Type: System.String
The name of the parameter.
type
Type: System.Data.SqlDbType
One of the SqlDbType values.
size
Type: System.Int32
The width of the column.
sourceColumn
Type: System.String
The name of the source column.

Return Value

Type: System.Data.SqlServerCe.SqlCeParameter
A reference to the new SqlCeParameter object.

The following example adds new element to a SqlCeParameterCollection and returns a reference to the new SqlCeParameter.

SqlCeParameter p1 = cmd.Parameters.Add("@Description", SqlDbType.NVarChar, 16, "Description");


Show:
© 2015 Microsoft