select * from han where intfield='+Combobox1.ItemIndex+'

解决方案 »

  1.   

    select * from han where intfield='+Combobox1.ItemIndex呵呵~~错了!!
      

  2.   

    select * from han where intfield='+inttostr(Combobox1.ItemIndex)
      

  3.   

    呵呵~~又看错了~~select * from han where intfield='+IntTOStr(Combobox1.ItemIndex)
      

  4.   

    你是要根据那个Index查询吗??
      

  5.   

    to ybt(ybt):不行呀,因为我的数据库里的intfield是数值类型,这样写也会类型不对的
      

  6.   

    query1.sql.add
    ('select * from han where intfield='+inttostr(Combobox1.ItemIndex));
      

  7.   

    lizhenjia(blizzard) 那样还不行吗?