红鱼儿

kbmMemTable中怎么根据UniqueRecID定位到对应的记录
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;

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

posted on 2019-05-09 17:04  红鱼儿  阅读(380)  评论(0编辑  收藏  举报