DB.TFieldDefs

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From DB.pas

TFieldDefs = class(TDefCollection)


Unit: DB

Type: class

Inherited Class Members: DB.TFieldDefs Members

Class Properties: DB.TFieldDefs Properties

Class Methods: DB.TFieldDefs Methods

Class Constructors & Destructors: DB.TFieldDefs Constructors

C++ Information

From DB.hpp

TFieldDefs = class(TDefCollection)


Unit: DB

Type: class

Inherited Class Members: DB.TFieldDefs Members

Class Properties: DB.TFieldDefs Properties

Class Methods: DB.TFieldDefs Methods

Class Constructors & Destructors: DB.TFieldDefs Constructors

Description

TFieldDefs holds the field definition (TFieldDef) objects that represent the physical fields underlying a dataset.


Datasets use TFieldDefs to manage the field definitions they use to create field objects that correspond to fields in a database table. Every field definition listed by TFieldDefs has a corresponding TField object, but not all TField objects have a corresponding field definition. For example, calculated fields do not have field definitions.

TTable and TClientDataSet objects also use TFieldDefs when creating a new table.

With object field types, such as TADTField and TArrayField, there are two ways to represent the field definitions: hierarchically or flattened. When represented hierarchically, object field definitions contain a set of child definitions for the constituent subfields. When represented as a flattened set, child field definitions appear as siblings sequentially after the parent field definition.

TFieldDefs stores field definitions hierarchically. This is in contrast to TFieldDefList, which lists the child TFieldDef objects of object fields sequentially after the parent TFieldDef.

Use the properties and methods of TFieldDefs to:

Access a specific field definition.

Add or delete field definitions from the list (when creating new tables).

Find out how many fields are defined.

Copy a set of field definitions to another dataset.

See Also

Personal tools
Translations
Newest Version