API:Bde.DBTables.TBDEDataSet.Lookup

From RAD Studio API Documentation
Jump to: navigation, search

[–] Properties
Type: function
Visibility: public
Source:
Bde.DBTables.pas
Bde.DBTables.hpp
Unit: Bde.DBTables
Parent: TBDEDataSet

Delphi

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

C++

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

Description

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

Bde.DBTables.TBDEDataSet.Lookup inherits from Data.DB.TDataSet.Lookup. All content below this line refers to Data.DB.TDataSet.Lookup.

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