网上找了这么一段代码。但是那一列的名字为销售金额,不是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;