Data.DB.TParams.CreateParam
Delphi
function CreateParam(FldType: TFieldType; const ParamName: string;
ParamType: TParamType): TParam;
C++
TParam* __fastcall CreateParam(TFieldType FldType, const System::UnicodeString ParamName, TParamType ParamType);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Data.DB.pas Data.DB.hpp |
Data.DB | TParams |
Description
Creates a new field parameter object and inserts it into the Items list.
Call CreateParam to instantiate a new TParam object and add it to the Items managed by this TParams object. Specify the field type of the new parameter as the value of FldType, specify the name of the parameter as the value of ParamName, and specify the type of parameter as the value of ParamType.
Note: Parameters for datasets that represent queries are only created by specifying parameters in the SQL statement. The TParam objects in such as dataset's Params property are created automatically when parameter tokens are added to the SQL statement.
See Also