dotConnect for MySQL Documentation
MySqlParameterCollection Class
Members  Example  See Also  Send comments on this topic.
Devart.Data.MySql Namespace : MySqlParameterCollection Class

Collects all parameters relevant to a MySqlCommand as well as their respective mappings to System.Data.DataSet columns.

Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.Data.Common.DbParameterCollection
         Devart.Common.DbParameterBaseCollection
            Devart.Data.MySql.MySqlParameterCollection

Syntax

Visual Basic (Declaration) 
Public Class MySqlParameterCollection 
   Inherits Devart.Common.DbParameterBaseCollection
   Implements ICollectionIEnumerableIListIDataParameterCollection 

Remarks

The number of parameters in the collection must be equal to the number of parameter placeholders within the command text, or MySQL raises an error.

Example

The following example adds instance of MySqlParameter to collection.
C#csharpCopy Code
public void AddMySqlParameters()
{
  // Create myConnection and myCommand.

  myCommand.CommandText = "DELETE Test.Dept WHERE DeptNo = :DeptNo";
  myCommand.Parameters.Add("DeptNo", MySqlType.Int).Value = 50;
  myCommand.ExecuteNonQuery();
}
C#Visual BasicCopy Code
Public Sub AddMySqlParameters()
  // Create myConnection and myCommand.

  myCommand.CommandText = "DELETE Test.Dept WHERE DeptNo = :DeptNo"
  myCommand.Parameters.Add("DeptNo", MySqlType.Int).Value = 50
  myCommand.ExecuteNonQuery()

End Sub 'AddMySqlParameters

Requirements

Namespace: Devart.Data.MySql

Platforms:Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8, Windows 10, Windows Server 2012 family.

Assembly: Devart.Data.Synchronization

See Also