H
hncz
Unregistered / Unconfirmed
GUEST, unregistred user!
S:='select sum(sl),sum(price*sl) from xxxx.db';
With Query1 Do
begin
Close;
SQL.Clear;
SQL.Add(S);
Open;
Label3.Caption := FloatToStr(FieldByName('SUM OF sl').asFloat);
Label4.Caption := FloatToStr(FieldByName('SUM OF price*sl').asFloat);
end;
执行后报“query1:field 'SUM OF price*sl' not found”,而前一句是对的,请高手指正,谢谢!
With Query1 Do
begin
Close;
SQL.Clear;
SQL.Add(S);
Open;
Label3.Caption := FloatToStr(FieldByName('SUM OF sl').asFloat);
Label4.Caption := FloatToStr(FieldByName('SUM OF price*sl').asFloat);
end;
执行后报“query1:field 'SUM OF price*sl' not found”,而前一句是对的,请高手指正,谢谢!