SqlCeParameterCollection.Add Method
Note: This namespace, class, or member is supported only in version 1.1 of the .NET Framework.
Adds a SqlCeParameter to the SqlCeCommand.
Overload List
Adds a SqlCeParameter object to the SqlCeCommand.
Supported only by the .NET Compact Framework.
[Visual Basic] Overloads Public Overridable Function Add(Object) As Integer Implements IList.Add
[JScript] public function Add(Object) : int;
Adds the specified SqlCeParameter to the SqlCeParameterCollection.
Supported only by the .NET Compact Framework.
[Visual Basic] Overloads Public Function Add(SqlCeParameter) As SqlCeParameter
[JScript] public function Add(SqlCeParameter) : SqlCeParameter;
Adds a SqlCeParameter to the SqlCeParameterCollection given the parameter name and value.
Supported only by the .NET Compact Framework.
[Visual Basic] Overloads Public Function Add(String, Object) As SqlCeParameter
[JScript] public function Add(String, Object) : SqlCeParameter;
Adds a SqlCeParameter to the SqlCeParameterCollection given the parameter name and data type.
Supported only by the .NET Compact Framework.
[Visual Basic] Overloads Public Function Add(String, SqlDbType) As SqlCeParameter
[JScript] public function Add(String, SqlDbType) : SqlCeParameter;
Adds a SqlCeParameter to the SqlCeParameterCollection given the the parameter name, data type, and column width.
Supported only by the .NET Compact Framework.
[Visual Basic] Overloads Public Function Add(String, SqlDbType, Integer) As SqlCeParameter
[JScript] public function Add(String, SqlDbType, int) : SqlCeParameter;
Adds a SqlCeParameter to the SqlCeCommand given the parameter name, data type, column width, and source column name.
Supported only by the .NET Compact Framework.
[Visual Basic] Overloads Public Function Add(String, SqlDbType, Integer, String) As SqlCeParameter
[C#] public SqlCeParameter Add(string, SqlDbType, int, string);
[C++] public: SqlCeParameter* Add(String*, SqlDbType, int, String*);
[JScript] public function Add(String, SqlDbType, int, String) : SqlCeParameter;
Example
[Visual Basic, C#, C++] The following example adds new element to a SqlCeParameterCollection. It assumes that a SqlCeCommand has already been created.
[Visual Basic, C#, C++] Note This example shows how to use one of the overloaded versions of Add. For other examples that might be available, see the individual overload topics.
[Visual Basic] Public Sub AddSqlCeParameter(ByVal cmd As SqlCeCommand) cmd.Parameters.Add("@Description", "Beverages") End Sub [C#] public void AddSqlCeParameter(SqlCeCommand cmd) { cmd.Parameters.Add("@Description", "Beverages"); } [C++] public: void AddSqlCeParameter(SqlCeCommand* cmd) { cmd->Parameters->Add(S"@Description", S"Beverages"); };
[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button in the upper-left corner of the page.
See Also
SqlCeParameterCollection Class | SqlCeParameterCollection Members | System.Data.SqlServerCe Namespace
Syntax based on .NET Framework version 1.1.
Documentation version 1.1.1.