Data.DB.TFieldDefs.Add
Delphi
procedure Add(const Name: string; DataType: TFieldType; Size: Integer = 0; Required: Boolean = False);
C++
HIDESBASE void __fastcall Add(const System::UnicodeString Name, TFieldType DataType, int Size = 0x0, bool Required = false);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | Data.DB.pas Data.DB.hpp |
Data.DB | TFieldDefs |
Description
Creates a new field definition object and adds it to the Items property.
Add is provided for backward compatibility. The recommended way to add new field definitions to the Items property array is using the AddFieldDef method.
Add uses the values passed in the Name, DataType, Size, and Required parameters and assigns them to the respective properties of the new field definition object.
If a field definition with same name already exists, Add raises an EDatabaseError exception.