OdbcParameterCollection Class
.NET Framework 2.0
Represents a collection of parameters relevant to an OdbcCommand and their respective mappings to columns in a DataSet. This class cannot be inherited.
Namespace: System.Data.Odbc
Assembly: System.Data (in system.data.dll)
Assembly: System.Data (in system.data.dll)
The following example assumes that the data source has a table name MoneyTable and a stored procedure named MoneyProcedure, which are defined as:
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.
Public Sub ExecuteStoredProcedure(connection As OdbcConnection) Dim command As OdbcCommand = connection.CreateCommand() command.CommandText = “{ call MoneyProcedure(?,?,?) ” command.Parameters.Add("", OdbcType.Int).Value = 1 command.Parameters.Add("", OdbcType.Decimal).Value = 2 command.Parameters.Add("", OdbcType.Decimal).Value = 3 End Sub
System.Object
System.MarshalByRefObject
System.Data.Common.DbParameterCollection
System.Data.Odbc.OdbcParameterCollection
System.MarshalByRefObject
System.Data.Common.DbParameterCollection
System.Data.Odbc.OdbcParameterCollection
Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.
Community Additions
ADD
Show: