Data.DB.TFieldDefList.FieldByName

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: public
Source:
Data.DB.pas
Data.DB.hpp
Unit: Data.DB
Parent: TFieldDefList

Delphi

function FieldByName(const Name: string): TFieldDef;

C++

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

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