我有个ComboBox..里面的items是某个表的一些字段..
现在想Select出满足ComboBox字段条件的记录出来....就是说查询的字段不是固定的,..

解决方案 »

  1.   

    先把Combobox里面的值传给一个数组s,再用select * from .. where ..in s..
      

  2.   

    么意思??
    比如Combobox有个Flux字段..
    当我下拉选择Flux的时候,要查询Flux>200怎么写呀??
      

  3.   

    var
    sqlstr,temp:string;begin
      temp:=combobx1.text;
      sqlstr:='select * from youtable where'+temp+'>'+'200';
    end;
      

  4.   

    sqlstr:='select * from youtable where '+temp+' > '+'200';//加上空格
      

  5.   

    谢谢...
    我想再问下就马上结帖..
    如果我只想Select出ComboBox 的那个字段怎么作呢??