Export (0) Print
Expand All

SqlCeParameterCollection.Add Method (SqlCeParameter)

Adds the specified SqlCeParameter to the SqlCeParameterCollection.

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

public SqlCeParameter Add(
	SqlCeParameter value
)

Parameters

value
Type: System.Data.SqlServerCe.SqlCeParameter
The SqlCeParameter to add to the collection.

Return Value

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

The following example adds a SqlCeParameter object to a SqlCeParameterCollection. It assumes that a SqlCeCommand has already been created.

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


Show:
© 2015 Microsoft