var s1,s2,s3:String;
begin while not DBGridEh.DataSource.DataSet.Eof do begin //获取DBGrid中的数据 s1 := DBGridEh.DataSource.DataSet.fieldByName('NAME').AsString; s2 := DBGridEh.DataSource.DataSet.fieldByName('Qty').AsString; s3 := DBGridEh.DataSource.DataSet.fieldByName(TotalQty).AsString; DBGridEh.DataSource.DataSet.Next; end;