delphi locate函数的使用

loc1:= qry1.FieldbyName('SPBM').AsString;      //商品编码

loc2:= qry1.FieldbyName('XH').AsString;          //型号

 

qry.Locate('XH;SPBM', VarArrayOf([loc2,loc1]), [loCaseInsensitive]);          //精确匹配  

 

在使用Locate时:

如果使用loCaseInsensitive就代表不分大小写查询数据;

如果使用loPartialKey就代表要以模糊查询(部分字符串)来查询数据。

posted on 2019-01-31 16:42  癫狂编程  阅读(633)  评论(0编辑  收藏  举报

导航

好的代码像粥一样,都是用时间熬出来的