居然出错.谁能帮我解决一下. Delphi / Windows SDK/API
http://www.delphi2007.net/DelphiDB/html/delphi_20061225053606125.html
我写了一段程序.如下:  
  A_DATABASE.ADOQuery2.Close;  
  A_DATABASE.ADOQuery2.SQL.Clear;  
  A_DATABASE.ADOQuery2.SQL.Add('SELECT   XULH,XIMNG   FROM   LXR   ORDER   BY   XULH');  
  A_DATABASE.ADOQuery2.Open;  
  A_DATABASE.ADOQuery2.Locate('xulh',TRIM(f_changj_lxr.Edit1.Text),[locaseinsensitive]);  
  编译的时候系统说我这个错误的位置是:  
  A_DATABASE.ADOQuery2.Locate('xulh',TRIM(f_changj_lxr.Edit1.Text),[locaseinsensitive]);  
  而在系统框的提示这样说的:  
  [Error]   f_cj_lxr.pas(262):   Undeclared   identifier:'lseinsensitive'  
  [Error]   f_cj_lxr.pas(262):   Incompatible   types:'TlocateOption'   and   'Integer'  
  [Fatal   Error]jinchjl.dpr(13):Could   not   compile   used   unit   'f_cj_lxr.pas'  
  我不明白的是,同样的写法在其它地方就通过了,这里就不行.谁能指导指导.谢谢.

是否模块中没包括DB.pas?  
   
  uses   DB;  
   
 

with   ADOQuery2   do  
          begin  
          Close;  
          SQL.Clear;  
          SQL.Add('SELECT   XULH,XIMNG   FROM   LXR   ORDER   BY   XULH');  
          Open;  
          Locate('xulh',TRIM(f_changj_lxr.Edit1.Text),[]);

>>Undeclared   identifier  
  >>Incompatible   types  
   
   
  非常常见的错误提示,通常是马虎所致  
   
   
  :)  
   
 

单元未包含进来

zhengsq007(实习实习)   :最仔细,并且提供了详细方法,我按他的方法做了就成了.所以决定大部分分给他.其它人参与者少点.谢谢大家

谢谢施舍。  
 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-02-05
  • 2022-12-23
  • 2021-06-04
  • 2021-07-22
  • 2022-02-19
  • 2021-07-19
猜你喜欢
  • 2022-02-12
  • 2021-10-18
  • 2022-02-10
  • 2021-07-31
  • 2021-11-09
  • 2021-09-21
  • 2021-06-02
相关资源
相似解决方案