firsrly  ,   I am sorry to send the message with English!!
    I want to ask a question that how to  use query and SQL daynic select!

解决方案 »

  1.   

    select sno 
     from student 
     where age=22
      

  2.   

    但是怎么用变量查询呢??
     var 
      kk:string
     begin
      query1.close;
      query1.sql.clear;
      query1.SQL.add('select *from 菜单表 where 菜名=花菜');
      query1.active:=ture;
     end;就这样的但总是说列名无效!!
      

  3.   

    with Adoquery1 do
        begin
          Close;
          SQL.Clear;
          str:=format('Select ID,almtime,almMessage from Alarm where stnTelNo=''%s''',[Combobox1.Text]);
          SQL.Add(str);
          Open;
        end;