function Lookup(const KeyFields:string;const KeyValues:Variant;const ResultFields:string):Variant;
KeyFields  用分号歌开的字段列表
KeyValues 要查找的变体型
ResultFields 用分号各开的要检索的列表
如:
procedure TTDataSetTestForm.LookupSpeedButtonClick(
Sender:TOBject);
var
KeyFields:String;
KeyValues:Variant;
ResultFields:string;
VarArrayIndex,LowBound,HighBound:Integer;
TheMessage:String;
begin
KeyFields:='State;Company';
KeyValues:=VarArrayOf(['CA','UnderWater Sports Co.']);
ResultFields:='Company;Addr1;Addr2;City;State;Zip;Country';
ResultVariant:=CustomerTable.LookUp(
KeyFields,
KeyValues,
ResultFields
);
if not VarIsNull(ResultVariant) then
begin
 TheMessage:='A lookup match was found for:';
 LowBound:=VarArrauLowBount(ResultVAriant,1);
 HightBount:=VarArrayHighBound(ResultVariant,1);
For VarArrayIndex:=LowBound to HighBound do
 TheMessage:=TheMessage+#13#10+ResultVariant[VarArrayIndex];
end
else
 begin
 TheMessage:='No LookUp Match Found.';
 end;
ShowMessage(TheMessage);
end;