TFieldDef is a field definition that corresponds to a physical field of a record in a table underlying a dataset.
TFieldDef = class(TNamedItem);
class TFieldDef : public TNamedItem;
A TFieldDef object contains the definition of one field in a table. The definition for a field includes such attributes as the field's name, data type, and size. TFieldDef objects are typically used in collections of such objects, such as the FieldDefs property of the TDataSet component.
There are two primary reasons for working with TFieldDef objects:
To obtain information about field types in a dataset without opening the dataset.
To specify field definitions for a new table.
When using an existing table, a field definition is automatically created for each field in the dataset that comes from the underlying database. Inspect the properties of TFieldDef to retrieve information about specific fields in the dataset.
When creating new tables, such as with the CreateTable method of TTableor the CreateDataSet method of TClientDataSet, TFieldDef objects supply the definitions for the new fields that will comprise the new table.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!