Skip to content

TDataSet.FieldByName

Search a field by name.

Declaration

Source position: db.pas line 1914

public 
function TDataSet.FieldByName(const FieldName: string) : TField;

Description

FieldByName is a shortcut for Fields.FieldByName: it searches for the field with fieldname equalling FieldName. The case is performed case-insensitive. The matching field instance is returned.

Errors

If the field is not found, an EDatabaseError exception will be raised.

See also

Name Description
TFields.FieldByname Find a field based on its name.
TDataset.FindField Find a field by name.