Skip to content

TFieldDefs.Add

Add a new field definition to the collection.

Declaration

Source position: db.pas line 235

public 
function Add(const AName: string; ADataType: TFieldType; 
            ASize: Integer; APrecision: Integer; ARequired: Boolean; 
            AReadOnly: Boolean; AFieldNo: Integer; 
            ACodePage: TSystemCodePage) : TFieldDef;  overload; overload;

function Add(const AName: string; ADataType: TFieldType; ASize: Word; 
            ARequired: Boolean; AFieldNo: Integer) : TFieldDef
            ;  overload; overload;

procedure Add(const AName: string; ADataType: TFieldType; ASize: Word; 
             ARequired: Boolean);  overload; overload;

procedure Add(const AName: string; ADataType: TFieldType; ASize: Word)
             ;  overload; overload;

procedure Add(const AName: string; ADataType: TFieldType);  overload; overload;

Description

Add adds a new item to the collection and fills in the Name, DataType, Size and Required properties of the newly added item with the provided parameters.

Errors

If an item with name AName already exists in the collection, then an exception will be raised.

See also

Name Description
TFieldDefs.AddFieldDef Add new TFieldDef.