试试设置TClientDataSet.FetchOnDemand := False;当需要新记录时,手动GetNextPacket。{This example shows how to use the BeforeGetRecords eventhandler (a TRemoteEventType value) to send the providerinformation it needs for incremental data fetching. Beforefetching the next data packet, the client dataset packagesup the key value of the last record so that the providerknows where to begin the next data packet. It also sendssome application-specific information, which is stored inMemo1. This method is used to pass the sql statement and thevalue of the first field for the last record to the server sothat the server can return the correct records. The completeproject using this code example is inDemos/DelphiWin32/VCLWin32/MIDAS/Pooler.}procedure TForm1.ClientDataSet1BeforeGetRecords(Sender: TObject; var OwnerData: OleVariant);var LastValue: OleVariant; CDSClone: TClientDataSet;begin if ClientDataSet1.Active then begin CDSClone := TClientDataSet.Create(Form1); try CDSClone.CloneCursor(ClientDataSet1, True); { turn off FetchOnDemand so that the clone only fetches the last LOCAL record } CDSClone.FetchOnDemand := False; CDSClone.Last; LastValue := CDSClone.Fields[0].AsString; CDSClone.Close; finally CDSClone.Free; end; end else LastValue := NULL; OwnerData := VarArrayOf([Memo1.Lines.Text, LastValue]);end;procedure TForm1.Button2Click(Sender: TObject);begin ClientDataSet1.PacketRecords := StrToInt(Edit1.Text); ClientDataSet1.GetNextPacket;end;