EPUB | CHM | PDF

TDataSet.Methods.FindField

Top Previous Next

Searches for a specified field in the dataset.

Syntax:

function FindField(const FieldName: String): TField;

Description:

Call FindField to determine if a specified field component exists in a dataset. 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.

FindField is the same as the FieldByName method, except that it returns nil rather than raising an exception when the field is not found.

See also: Example: FindField,AsString