RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TFieldDefList.FieldByName Method

Returns a field definition object given its field name.

Pascal
function FieldByName(const Name: WideString): TFieldDef;
C++
__fastcall TFieldDef FieldByName(const BSTR 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++).
 

 

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