试试这样
  query1.Close;  
     query1.SQL.Clear;  
     query1.SQL.Add('select  QY,THDW  from  xs');  
     query1.SQL.Add('where  QY= 0001 ');  
     query1.Open

解决方案 »

  1.   

    不行!还是有毛病 project project2.exe exception class EOleException with '列名''0001'无效
      

  2.   

    不会吧,有没有这个字段啊?
    实在不行用参数试试!
         query1.SQL.Add('select  QY,THDW  from  xs ');  
         query1.SQL.Add('where  QY = ''0001''  ');  
    注意空格,把,sql.text显示出来看看。