MySqlParameterCollection Class |
Namespace: MySql.Data.MySqlClient
The MySqlParameterCollection type exposes the following members.
Name | Description | |
---|---|---|
![]() | Count |
Gets the number of MySqlParameter objects in the collection.
(Overrides DbParameterCollectionCount.) |
![]() | IsFixedSize |
Gets a value that indicates whether the MySqlParameterCollection
has a fixed size.
(Overrides DbParameterCollection.IsFixedSize.) |
![]() | IsReadOnly |
Gets a value that indicates whether the MySqlParameterCollection
is read-only.
(Overrides DbParameterCollection.IsReadOnly.) |
![]() | IsSynchronized |
Gets a value that indicates whether the MySqlParameterCollection
is synchronized.
(Overrides DbParameterCollection.IsSynchronized.) |
![]() | ItemInt32 |
Gets the MySqlParameter at the specified index.
|
![]() | ItemString |
Gets the MySqlParameter with the specified name.
|
![]() | SyncRoot |
Gets an object that can be used to synchronize access to the
MySqlParameterCollection.
(Overrides DbParameterCollection.SyncRoot.) |
Name | Description | |
---|---|---|
![]() | Add(Object) |
Adds the specified MySqlParameter object to the MySqlParameterCollection.
(Overrides DbParameterCollectionAdd(Object).) |
![]() | Add(MySqlParameter) |
Adds the specified MySqlParameter object to the MySqlParameterCollection.
|
![]() | Add(String, MySqlDbType) |
Adds a MySqlParameter to the MySqlParameterCollection given the parameter name and the data type.
|
![]() | Add(String, MySqlDbType, Int32) |
Adds a MySqlParameter to the MySqlParameterCollection with the parameter name, the data type, and the column length.
|
![]() | Add(String, MySqlDbType, Int32, String) |
Adds a MySqlParameter to the MySqlParameterCollection with the parameter name, the data type, the column length, and the source column name.
|
![]() | AddRange |
Adds an array of values to the end of the MySqlParameterCollection.
(Overrides DbParameterCollectionAddRange(Array).) |
![]() | AddWithValue |
Adds a parameter and its value.
|
![]() | Clear |
Removes all items from the collection.
(Overrides DbParameterCollectionClear.) |
![]() | Contains(Object) |
Gets a value indicating whether a MySqlParameter exists in the collection.
(Overrides DbParameterCollectionContains(Object).) |
![]() | Contains(String) |
Gets a value indicating whether a MySqlParameter with the specified parameter name exists in the collection.
(Overrides DbParameterCollectionContains(String).) |
![]() | CopyTo |
Copies MySqlParameter objects from the MySqlParameterCollection to the specified array.
(Overrides DbParameterCollectionCopyTo(Array, Int32).) |
![]() | CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetEnumerator |
Returns an enumerator that iterates through the MySqlParameterCollection.
(Overrides DbParameterCollection.GetEnumerator.) |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetParameter(Int32) | (Overrides DbParameterCollectionGetParameter(Int32).) |
![]() | GetParameter(String) |
Retrieve the parameter with the given name.
(Overrides DbParameterCollectionGetParameter(String).) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | IndexOf(Object) |
Gets the location of a MySqlParameter in the collection.
(Overrides DbParameterCollectionIndexOf(Object).) |
![]() | IndexOf(String) |
Gets the location of the MySqlParameter in the collection with a specific parameter name.
(Overrides DbParameterCollectionIndexOf(String).) |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | Insert |
Inserts a MySqlParameter into the collection at the specified index.
(Overrides DbParameterCollectionInsert(Int32, Object).) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) |
![]() | Remove |
Removes the specified MySqlParameter from the collection.
(Overrides DbParameterCollectionRemove(Object).) |
![]() | RemoveAt(Int32) |
Removes the specified MySqlParameter from the collection using a specific index.
(Overrides DbParameterCollectionRemoveAt(Int32).) |
![]() | RemoveAt(String) |
Removes the specified MySqlParameter from the collection using the parameter name.
(Overrides DbParameterCollectionRemoveAt(String).) |
![]() | SetParameter(Int32, DbParameter) | (Overrides DbParameterCollectionSetParameter(Int32, DbParameter).) |
![]() | SetParameter(String, DbParameter) | (Overrides DbParameterCollectionSetParameter(String, DbParameter).) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
public void AddSqlParameters() { // ... // create myDataSet and myDataAdapter // ... myDataAdapter.SelectCommand.Parameters.Add("@CategoryName", MySqlDbType.VarChar, 80).Value = "toasters"; myDataAdapter.SelectCommand.Parameters.Add("@SerialNum", MySqlDbType.Long).Value = 239; myDataAdapter.Fill(myDataSet); }