Skip to content

TFields

Collection of #fcl.db.TField instances.

Declaration

Source position: db.pas line 1340

type

  TFields = class(TObject)
  public
    constructor Create;
    destructor Destroy;
    procedure Add;
    procedure CheckFieldName;
    procedure CheckFieldNames;
    procedure Clear;
    function FindField : TField;
    function FieldByName : TField;
    function FieldByNumber : TField;
    function GetEnumerator : TFieldsEnumerator;
    procedure GetFieldNames;
    function IndexOf : LongInt;
    procedure Remove;
    property Count: Integer; {r}
    property Dataset: TDataSet; {r}
    property Fields[Index : Integer]: TField; {rw}
  end;

Inheritance

Description

TFields mimics a TCollection class for the Fields property of TDataset instance. Since TField is a descendent of TComponent, it cannot be an item of a collection, and must be managed by another class.

Properties

Member Visibility Description
Count read only public Number of fields in the list.
Dataset read only public Dataset the fields belong to.
Fields public Indexed access to the fields in the list.
See all Properties

Methods

Member Visibility Description
Add public Add a new field to the list.
CheckFieldName public Check field name for duplicate entries.
CheckFieldNames public Check a list of field names for duplicate entries.
Clear public Clear the list of fields.
Create public Create a new instance of TFields.
Destroy public Free the TFields instance.
FieldByName public Find a field based on its name.
FieldByNumber public Search field based on its fieldnumber.
FindField public Find a field based on its name.
GetEnumerator public Return an enumerator for the for..in construct.
GetFieldNames public Get the list of fieldnames.
IndexOf public Return the index of a field instance.
Remove public Remove an instance from the list.
See all Methods

See also

Name Description
TField Provide access to the contents of a single field in a record.
TDataset Base class for records-based data-access.
TDataset.Fields Indexed access to the fields of the dataset.