网上找了这么一段代码。但是那一列的名字为销售金额,不是S,怎么处理,字节段是float格式
procedure TForm1.Button2Click(Sender: TObject);var
S:double;
beginS := 0;
with adoquery1 do
begin
First;
while not EOF do
begin
S := S + FieldValues[ 'S '].AsFloat;
Next;
end;
end;
edit1.Text := floattostr(S);
end;
procedure TForm1.Button2Click(Sender: TObject);var
S:double;
beginS := 0;
with adoquery1 do
begin
First;
while not EOF do
begin
S := S + FieldValues[ 'S '].AsFloat;
Next;
end;
end;
edit1.Text := floattostr(S);
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货