应该是类似于如下的方法:<br>procedure TfrmDemo.btnSearchClick(Sender: TObject);<br>var<br> ClientDataSet: TClientDataSet;<br>begin<br> ClientDataSet := TClientDataSet.Create(self);<br> ExecSQL(ClientDataSet, 'select * from ta');//把结果放到ClientDataSet中<br> with ClientDataSet do<br> begin<br> while not Eof do<br> begin<br> //修改结果并放到Grid中<br> ...; <br> Next;<br> end;<br> end;<br>end;