Data.DB.TParams.AddParameter
Delphi
function AddParameter: TParam;
C++
TParam* __fastcall AddParameter();
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Data.DB.pas Data.DB.hpp |
Data.DB | TParams |
Description
Creates a new TParam instance and adds it to the TParams item array.
Use AddParameter to create a TParam in the TParams collection. The new TParam is placed at the end of the TParams item array.
AddParameter returns the new TParam item.
Note: To create, add, and initialize a new TParam to the list, you can use CreateParam instead of this method. AddParameter only creates and adds a TParam.
Note: Parameters for datasets that represent queries are only created by specifying parameters in the SQL statement. The TParam objects in such a dataset's Params property are created automatically when parameter tokens are added to the SQL statement.