Data.Win.ADODB.TParameters.CreateParameter
Delphi
function CreateParameter(const Name: WideString; DataType: TDataType;
Direction: TParameterDirection; Size: Integer; Value: OleVariant): TParameter;
C++
TParameter* __fastcall CreateParameter(const System::WideString Name, TDataType DataType, TParameterDirection Direction, int Size, const System::OleVariant &Value);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Data.Win.ADODB.pas Data.Win.ADODB.hpp |
Data.Win.ADODB | TParameters |
Description
Adds a parameter to the collection.
Call CreateParameter to create a single TParameter object and add it to the TParameters collection. Property values for the newly added TParameter object are supplied through CreateParameter parameters.
Name
is a WideString value containing the name of the newly created TParameter object.
DataType
is a TDataType value indicating the data type of the parameter the new TParameter object represents.
Direction
is a TParameterDirection value indicating the parameter type. A parameter represented by a TParameter may be any one of: input, output, input-output, return value. Designate a parameter as unknown if the parameter type is not known at the time the TParameter is created.
Size
indicates the maximum size of the parameter's value.
Value
is an OleVariant containing the parameter's value. A value needs not be passed for Value when the TParameter is created. It can be assigned later. If no value is assigned at this time, pass nil (Delphi) or NULL (C++) for Value.
ADOStoredProc1.CreateParameter('Parm1', ftString, pdInput, 10, NULL);