See Also

MySqlParameterCollection Members  | Devart.Data.MySql Namespace  | MySqlParameter Class  | MySqlCommand Class

 

Language

Visual Basic

C#

Show All

See AlsoLanguagesDevart.Data.MySqlSend comments on this topic.

MySqlParameterCollection Class

Devart.Data.MySql Namespace : MySqlParameterCollection Class

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

For a list of all members of this type, see MySqlParameterCollection members.

Inheritance Hierarchy

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

Syntax

[Visual Basic]
Public Class MySqlParameterCollection    Inherits DbParameterBaseCollection    Implements ICollectionIEnumerableIListIDataParameterCollection 
[C#]
public class MySqlParameterCollection : DbParameterBaseCollection, 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#] 

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(); 

[Visual Basic] 

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

 

See Also

MySqlParameterCollection Members  | Devart.Data.MySql Namespace  | MySqlParameter Class  | MySqlCommand Class

 

 


© 2002 - 2014 Devart. All Rights Reserved.