D dez_0609 Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-02 #2 在sql属性中直接计算:字段1+字段2+... as 合计 或者用计算字段
A app2001 Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-02 #5 procedure TDataModule1.adoquery1CalcFields(DataSet: TDataSet); begin DataSet.FieldByName('aa').Value:=DataSet.FieldByName('a1').Value+DataSet.FieldByName('a2').Value; end; 试试看,行不行?
procedure TDataModule1.adoquery1CalcFields(DataSet: TDataSet); begin DataSet.FieldByName('aa').Value:=DataSet.FieldByName('a1').Value+DataSet.FieldByName('a2').Value; end; 试试看,行不行?
B blyb Unregistered / Unconfirmed GUEST, unregistred user! 2004-03-02 #6 用SQL语句完成: select 字段1+字段2+... as 合计 from tablename where......