Data.DB.TFieldDefs.AddFieldDef

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function AddFieldDef: TFieldDef;

C++

TFieldDef* __fastcall AddFieldDef();

Properties

Type Visibility Source Unit Parent
function public
Data.DB.pas
Data.DB.hpp
Data.DB TFieldDefs

Description

Creates a new field definition object and adds it to the Items property of this TFieldDefs object.

Call AddFieldDef to add field definitions when creating a client dataset's data or a database table. AddFieldDef returns the new TFieldDef object that is added to the collection of field definitions. After calling AddFieldDef, set the properties of the newly added TFieldDef object to specify the name, type, and size of field that should be created.

Note: AddFieldDef is only valid in the context of creating field definitions for a table to be created with a subsequent call to the CreateTable or CreateDataSet method. It cannot be used to add fields to an already-existing table.

See Also



Code Examples