在表中定义了:chuchangjia 为 money型的要查询:select * from kucun2 where chuchangjia>='''+edit23.text+'''
出错了。                                   ~~~~~~~~~~~~~~~~~~~这边错
需要如何定义一个变量,或者如何转换类型才能取得money类型的字段呢?大虾帮帮忙吧。。

解决方案 »

  1.   

    我试过了,where chuchangjia>=strtofloat(edit23.text)这样写,如果只对一个查询值,没有出错,但结果是无效的。也就是相当于edit23.text的值是空值传入如果是where chuchangjia>=strtofloat(edit23.text) and chuchangjia<=strtofloat(edit24.text)  然后在edit23跟edit24里同时输入查询的值,就出错了。说strtofloat认不到,是怎么回事?大虾救救我啊
      

  2.   

    select * from kucun2 where chuchangjia>='+edit23.text+'
      

  3.   

    select * from kucun2 where chuchangjia>='+edit23.text+' and chuchangjia<='+edit24.text
      

  4.   

    'select * from kucun2 where chuchangjia>='+edit23.text
      

  5.   

    把money 类型当作float来处理就可以了