Skip to content

TFields.FieldByName

Find a field based on its name.

Declaration

Source position: db.pas line 1364

public 
function TFields.FieldByName(const Value: string) : TField;

Description

Fieldbyname searches the list of fields and returns the field instance whose FieldName property matches Value. The search is performed case-insensitively.

Errors

If no field instance is found, then an exception is raised. If this behaviour is undesired, use TField.FindField, where Nil is returned if no match is found.

See also

Name Description
TFields.FindField Find a field based on its name.
TFields.FieldName
Tfields.FieldByNumber Search field based on its fieldnumber.
TFields.IndexOf Return the index of a field instance.