TurboDB VCL Component Library
|Previous Top Next|
TTdbFieldDef is a field definition that corresponds to a physical field of a record in a TurboDB table underlying a dataset.
A TTdbFieldDef 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. TTdbFieldDef objects are typically used in collections of such objects, such as the FieldDefsTdb property of the TTdbDataSet component.
When using an existing table, a field definition is automatically created for each field in the dataset. Inspect the properties of TTdbFieldDef to retrieve information about specific fields in the dataset.
When creating new tables, such as with the TTdbTable.CreateTable method, TTdbFieldDef objects are used to supply the definitions for the new fields that will comprise the new table.
A field definition has a corresponding TField object, but not all TField objects have a corresponding field definition object. For example, calculated fields do not have field definition objects.
There are two primary reasons for working with TTdbFieldDef objects:
|•||To obtain information about field types in a table without opening the table.|
|•||To specify field definitions for a new table or for altering a table.|