function TForm5.LocateUniqueRecID(aDataSet: TkbmMWCustomClientQuery; AID: TkbmNativeInt): Boolean;
var
  i:Integer;
  ARecordID:TkbmNativeInt;
  pRec: PkbmRecord;
  ARecords: TkbmList;
begin
  result:=False;
  ARecords:=aDataSet.Common.Records;
  for i := 0 to ARecords.Count - 1 do
   begin
        pRec := PkbmRecord(ARecords.Items[i]);
        if pRec = nil then
           Continue;
        if pRec.UniqueRecordID=AID then
        begin
              ARecordID:=pRec.RecordID;
              while not ADataSet.Eof do
              begin
                 if aDataSet.RecordID=ARecordID then
                 begin
                   Result:=True;
                   Break;
                 end;
                 ADataset.Next;
              end;
        end;
if result then Break;
end; end;

 有朋友问我这个问题,写到这里了!

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。