('select * from 图书基本信息表 where '''+trim(combobox1.text)+'''>0  order by '''+trim(combobox1.text)+''' ');
运行时提示
VARCHAR转换为INT时出错,怎么解决。高手快来!

解决方案 »

  1.   

    combobox1.text是字段名吧sql :='select * from 图书基本信息表 where '+trim(combobox1.text)+'>0 order by '+trim(combobox1.text); 
      

  2.   

    combobox1.text是组件中的内容的意思
      

  3.   


    combobox1.text不是图书基本信息表中字段名吗?是什么类型?('select * from 图书基本信息表 where '+trim(combobox1.text)+'>0  order by '+trim(combobox1.text)+'')
      

  4.   

    ('select * from 图书基本信息表 where ['+trim(combobox1.text)+
     '] > 0  order by ['+ trim(combobox1.text)+']');你的 Combobox1.text  對應的字段是什麼類型的?
      

  5.   

    我的combobox.text中都是放的是varchar的,
      

  6.   

    如果是這樣的話,這樣寫;('select * from 图书基本信息表 where ['+trim(combobox1.text)+
     '] > '+Quotedstr('0')+'   order by ['+ trim(combobox1.text)+']');
      

  7.   

    order by ['+ trim(combobox1.text) 這就是排序啊