Data.DB.TFields.FindField

De RAD Studio API Documentation
Aller à : navigation, rechercher

Delphi

function FindField(const FieldName: string): TField;

C++

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

Propriétés

Type Visibilité  Source Unité  Parent
function public
Data.DB.pas
Data.DB.hpp
Data.DB TFields

Description

Renvoie le champ du nom spécifié.

Appelez FindField pour déterminer si un composant de champ spécifié est référencé dans l'objet TFields. FieldName est le nom du champ qu'on cherche. Si FindField trouve un champ avec un nom correspondant, elle renvoie le composant TField pour le champ spécifié. Sinon, elle renvoie nil (Delphi) ou NULL (C++).

Remarque :  FindField diffère de la méthode FieldByName seulement quand le champ nommé n'est pas dans la liste. Quand le champ est introuvable, FindField renvoie nil (Delphi) ou NULL (C++) tandis que FieldByName déclenche une exception.

Voir aussi