RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TFields.FindField Method

Returns a field given its field name.

Pascal
function FindField(const FieldName: WideString): TField;
C++
__fastcall TField FindField(const BSTR FieldName);

Call FindField to determine if a specified field component is referenced in the TFields object. FieldName is the name of the field for which to search. 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++).

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

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!