Data.DB.TFieldDefList.FieldByName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FieldByName(const Name: string): TFieldDef;

C++

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

Properties

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

Description

Returns a field definition object given its field name.

Call FieldByName to obtain information about a particular field definition object. Specify the name of the field as the value of the Name parameter. If Name is not found, FieldByName raises an EDatabaseError exception with the error message "Field not found".

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

See Also