
'Declaration Public NotInheritable Class TdParameterCollection Inherits System.Data.Common.DbParameterCollection Implements System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.Data.IDataParameterCollection
'Usage Dim instance As TdParameterCollection
public sealed class TdParameterCollection : System.Data.Common.DbParameterCollection, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.Data.IDataParameterCollection
public ref class TdParameterCollection sealed : public System.Data.Common.DbParameterCollection, System.Collections.ICollection, System.Collections.IEnumerable, System.Collections.IList, System.Data.IDataParameterCollection
Parameterized SQL statements accept one or more input parameters (TdParameter). TdParameter represents the data value and can be associated with TdCommand objects using TdCommand.Parameters property. TdCommand.Parameters is an instance of TdParameterCollection and holds all input, input-output and output parameters.
It is highly recommended that parameterized queries be used in order to take advantage of the Teradata Statement-Cache. See the Teradata SQL manual for additional information.
public void InsertOrder(TdConnection cn, String orderId, String customerId, DateTime orderDate) { TdCommand cmd = new TdCommand("Insert Into Order (OrderID, CustomerID, " + "OrderDate) Values (?, ?, ?)", cn); cmd.Parameters.Add("orderId", TdType.Char, 15); cmd.Parameters.Add("customerId", TdType.Char, 10); cmd.Parameters.Add("orderDate", TdType.Date); cmd.Parameters["orderId"].Value = orderId; cmd.Parameters["customerId"].Value = customerId; cmd.Parameters["orderDate"].Value = orderDate; cmd.ExecuteNonQuery(); }
System.Object
System.MarshalByRefObject
System.Data.Common.DbParameterCollection
Teradata.Client.Provider.TdParameterCollection
Target Platforms: Windows 8.1, Windows 10, Windows Server 2012 R2, Windows Server 2016, Windows Server 2019