Data.DB.TDataSet.FindField

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function FindField(const FieldName: string): TField;

C++

TField* __fastcall FindField(const System::UnicodeString FieldName);

Properties

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

Description

Searches for a specified field in the dataset.

Call FindField to determine if a specified field component exists in a dataset. FieldName is the name of the field for which to search. This name can be the the name of a simple field, the name of a subfield of an object field that has been qualified by the parent field's name, or the name of an aggregated field.

If FindField finds a field with a matching name, it returns the TField component for the specified field. Otherwise it returns nil (Delphi) or NULL (C++).

FindField is the same as the FieldByName method, except that it returns nil (Delphi) or NULL (C++) rather than raising an exception when the field is not found.

See Also


Code Examples