Unit 'DB' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TFields.FieldByName

Find a field based on its name.

Declaration

Source position: db.pas line 1360

public function TFields.FieldByName(

  const Value: string

):TField;

Arguments

Value

  

Fieldname to search for.

Function result

Field instance with FieldName matching Value.

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

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.


Documentation generated on: Dec 22 2024