This documentation is archived and is not being maintained.
OdbcParameterCollection Class
Visual Studio 2010
Represents a collection of parameters relevant to an OdbcCommand and their respective mappings to columns in a DataSet. This class cannot be inherited.
System::Object
System::MarshalByRefObject
System.Data.Common::DbParameterCollection
System.Data.Odbc::OdbcParameterCollection
System::MarshalByRefObject
System.Data.Common::DbParameterCollection
System.Data.Odbc::OdbcParameterCollection
Assembly: System.Data (in System.Data.dll)
The OdbcParameterCollection type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Count | Returns an Integer that contains the number of elements in the OdbcParameterCollection. Read-only. (Overrides DbParameterCollection::Count.) |
![]() | IsFixedSize | Gets a value that indicates whether the OdbcParameterCollection has a fixed size. Read-only. (Overrides DbParameterCollection::IsFixedSize.) |
![]() | IsReadOnly | Gets a value that indicates whether the OdbcParameterCollection is read-only. (Overrides DbParameterCollection::IsReadOnly.) |
![]() | IsSynchronized | Gets a value that indicates whether the OdbcParameterCollection is synchronized. Read-only. (Overrides DbParameterCollection::IsSynchronized.) |
![]() | Item[Int32] | Gets or sets the OdbcParameter at the specified index. |
![]() | Item[String] | Gets or sets the OdbcParameter with the specified name. |
![]() | SyncRoot | Gets an object that can be used to synchronize access to the OdbcParameterCollection. Read-only. (Overrides DbParameterCollection::SyncRoot.) |
| Name | Description | |
|---|---|---|
![]() | Add(Object) | Adds the specified OdbcParameter object to the OdbcParameterCollection. (Overrides DbParameterCollection::Add(Object).) |
![]() | Add(OdbcParameter) | Adds the specified OdbcParameter to the OdbcParameterCollection. |
![]() | Add(String, OdbcType) | Adds an OdbcParameter to the OdbcParameterCollection, given the parameter name and data type. |
![]() | Add(String, Object) | Obsolete. Adds an OdbcParameter to the OdbcParameterCollection given the parameter name and value. |
![]() | Add(String, OdbcType, Int32) | Adds an OdbcParameter to the OdbcParameterCollection, given the parameter name, data type, and column length. |
![]() | Add(String, OdbcType, Int32, String) | Adds an OdbcParameter to the OdbcParameterCollection given the parameter name, data type, column length, and source column name. |
![]() | AddRange(Array) | Adds an array of values to the end of the OdbcParameterCollection. (Overrides DbParameterCollection::AddRange(Array).) |
![]() | AddRange(array<OdbcParameter>) | Adds an array of OdbcParameter values to the end of the OdbcParameterCollection. |
![]() | AddWithValue | Adds a value to the end of the OdbcParameterCollection. |
![]() | Clear | Removes all OdbcParameter objects from the OdbcParameterCollection. (Overrides DbParameterCollection::Clear().) |
![]() | Contains(Object) | Determines whether the specified Object is in this OdbcParameterCollection. (Overrides DbParameterCollection::Contains(Object).) |
![]() | Contains(OdbcParameter) | Determines whether the specified OdbcParameter is in this OdbcParameterCollection. |
![]() | Contains(String) | Gets a value indicating whether an OdbcParameter object with the specified parameter name exists in the collection. (Overrides DbParameterCollection::Contains(String).) |
![]() | CopyTo(Array, Int32) | Copies all the elements of the current OdbcParameterCollection to the specified one-dimensional Array starting at the specified destination Array index. (Overrides DbParameterCollection::CopyTo(Array, Int32).) |
![]() | CopyTo(array<OdbcParameter>, Int32) | Copies all the elements of the current OdbcParameterCollection to the specified OdbcParameterCollection starting at the specified destination index. |
![]() | 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(Object) | 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 OdbcParameterCollection. (Overrides DbParameterCollection::GetEnumerator().) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | GetParameter(Int32) | Returns the DbParameter object at the specified index in the collection. (Inherited from DbParameterCollection.) |
![]() | GetParameter(String) | Returns DbParameter the object with the specified name. (Inherited from DbParameterCollection.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | IndexOf(Object) | Gets the location of the specified Object within the collection. (Overrides DbParameterCollection::IndexOf(Object).) |
![]() | IndexOf(OdbcParameter) | Gets the location of the specified OdbcParameter within the collection. |
![]() | IndexOf(String) | Gets the location of the specified OdbcParameter with the specified name. (Overrides DbParameterCollection::IndexOf(String).) |
![]() | InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) |
![]() | Insert(Int32, OdbcParameter) | Inserts a OdbcParameter object into the OdbcParameterCollection at the specified index. |
![]() | Insert(Int32, Object) | Inserts a Object into the OdbcParameterCollection at the specified index. (Overrides DbParameterCollection::Insert(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(Object) | Removes the Object object from the OdbcParameterCollection. (Overrides DbParameterCollection::Remove(Object).) |
![]() | Remove(OdbcParameter) | Removes the OdbcParameter from the OdbcParameterCollection. |
![]() | RemoveAt(Int32) | Removes the OdbcParameter from the OdbcParameterCollection at the specified index. (Overrides DbParameterCollection::RemoveAt(Int32).) |
![]() | RemoveAt(String) | Removes the OdbcParameter from the OdbcParameterCollection with the specified parameter name. (Overrides DbParameterCollection::RemoveAt(String).) |
![]() | SetParameter(Int32, DbParameter) | Sets the DbParameter object at the specified index to a new value. (Inherited from DbParameterCollection.) |
![]() | SetParameter(String, DbParameter) | Sets the DbParameter object with the specified name to a new value. (Inherited from DbParameterCollection.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | IDataParameterCollection::Item | Gets or sets the parameter at the specified index. (Inherited from DbParameterCollection.) |
![]() ![]() | IList::Item | Gets or sets the element at the specified index. (Inherited from DbParameterCollection.) |
The following example assumes that the data source has a table named MoneyTable and a stored procedure named MoneyProcedure, which are defined as follows:
CREATE TABLE MoneyTable (col1 int, col2 smallmoney, col3 decimal); CREATE PROC MoneyProcedure (@p1 int, @p2 smallmoney, @p3 decimal) AS INSERT INTO MyTable VALUES (@p1, @p2, @p3);
The example creates parameters and calls the MoneyProcedure stored procedure.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show:

