错在'select * from xkzdb where xkzh strtoint(combobox3.text) and xkzh <strtoint(combobox4.text)‘中,将查询字符串改为'select * from xkzdb where xkzh > ’ +  combobox3.text+'and xkzh < ' + combobox4.text'

解决方案 »

  1.   

    strtoint好像不是数据库的函数,而是Delphi的函数吧。
    'select * from xkzdb where xkzh>'+combobox3.text+' and xkzh <'+combobox4.text
    试试看。
      

  2.   

    在查询中如果用到字符患要加上""号,'select * form "xkzdb" ......
      

  3.   

    strtoint(combobox3.text)用变量 
      

  4.   

    如果该字段为字符型
    这句怎么改呢???
    begin
    with dm.query1 do
    begin
      close;
      sql.clear;
      sql.add('select * from xkzdb where xkzh strtoint(combobox3.text) and xkzh <strtoint(combobox4.text)');
      open;
    end; end;
      

  5.   

    如果该字段为字符型
    这句怎么改呢???
    begin
    with dm.query1 do
    begin
      close;
      sql.clear;
      sql.add('select * from xkzdb where xkzh strtoint(combobox3.text) and xkzh <strtoint(combobox4.text)');
      open;
    end; end;