Data.DB.TFieldList.FieldByName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FieldByName(const Name: string): TField;

C++

TField* __fastcall FieldByName(const System::UnicodeString Name);

Properties

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

Description

Returns a field, given its name.

Call FieldByName to retrieve field information for a field when only the field's name is known. FieldName is the name of an existing field. FieldByName returns the TField component for the specified field. An application can access specific properties and methods of the field directly.

If the specified field is not found, FieldByName raises an EDatabaseError exception.

Note: FieldByName differs from the Find method only when the named field is not in the list. When the field is not found, FieldByName raises an exception, while Find returns nil (Delphi) or NULL (C++).

See Also