From RAD Studio API Documentation
Jump to: navigation, search


function Lookup(const KeyFields: string; const KeyValues: Variant;
const ResultFields: string): Variant; virtual;


virtual System::Variant __fastcall Lookup(const System::UnicodeString KeyFields, const System::Variant &KeyValues, const System::UnicodeString ResultFields);


Type Visibility Source Unit Parent
function public
Data.DB TDataSet


Implements a virtual method to retrieve field values from a record that matches specified search values.

This function:

Checks whether the dataset is unidirectional, and if so, raises an EDatabaseError exception.

Returns a Variant with the value false, indicating that a matching record was not found.

Descendant classes that are not unidirectional override this method so that it locates the record where the fields identified by the comma-delimited string KeyFields have the values specified by the Variant or Variant array KeyValues. In classes that implement Lookup, it returns a Variant or Variant array that contains the value or values of the fields specified by the comma-delimited string ResultFields on the specified record.

See Also