想完成这样的功能:
一个是
 procedure TForm1.Button1Click(Sender: TObject);
begin
  with ADOQuery1 do
  begin
    Close;
    SQL.Clear;
    SQL.Add('select * from v_result');
    SQL.Add('where 考试='+ComboBox1.Text);
    Open;
  end;
end;
查出某次成绩的表
我想在点击Button1同时查出这个表的同时统计总人数为多少,并将结果放在LABLE的CAPTION中。
begin
    Close;
    SQL.Clear;
    SQL.Add('select count(姓名) from v_result');
    SQL.Add('where 考试='+ComboBox1.Text);
    open;
  end;
以上的查询语句放在哪里呢?