Unit 'DB' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TFieldDef

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

Class to describe one field in a record in a dataset.

Declaration

Source position: db.pas line 174

type TFieldDef = class(TNamedItem)

public

  constructor Create();

  

Constructor for TFieldDef.

  destructor Destroy; override;

  

Free the TFieldDef instance.

  function AddChild;

  procedure Assign(); override;

  

Assign the contents of one TFieldDef instance to another.

  function CreateField();

  

Create TField instance based on definitions in current TFieldDef instance.

  function HasChildDefs;

  property FieldClass: TFieldClass; [r]

  

TField class used for this fielddef.

  property FieldNo: LongInt; [r]

  

Field number.

  property CharSize: Word; [r]

  

Character size.

  property InternalCalcField: Boolean; [rw]

  

Is this a definition of an internally calculated field ?

  property ParentDef: TFieldDef; [r]

  property Required: Boolean; [rw]

  

Is the field required ?

  property Codepage: TSystemCodePage; [r]

  

System code page for the values in string and wide string field types.

published

  property Attributes: TFieldAttributes; [rw]

  

Additional attributes of the field.

  property DataType: TFieldType; [rw]

  

Data type for the field.

  property ChildDefs: TFieldDefs; [rws]

  property Precision: LongInt; [rw]

  

Precision used in BCD (Binary Coded Decimal) fields.

  property Size: Integer; [rw]

  

Size of the buffer needed to store the data of the field.

end;

Inheritance

TFieldDef

  

Class to describe one field in a record in a dataset.

|

TNamedItem

  

Named collection item.

|

TCollectionItem

|

TPersistent

|

TObject,IFPObserved

Description

TFieldDef is used to describe the fields that are present in the data underlying the dataset. For each field in the underlying field, an TFieldDef instance is created when the dataset is opened. This class offers almost no methods, it is mainly a storage class, to store all relevant properties of fields in a record (name, data type, size, required or not, etc.)

See also

TDataset.FieldDefs

  

Definitions of available fields in the underlying database.

TFieldDefs

  

Collection of TFieldDef instances.


Documentation generated on: Oct 27 2024