标题:在pb中使用SETFILTER进行两个条件以上筛选总报错
只看楼主
linzhonglin
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2011-2-21
 问题点数:0 回复次数:4 
在pb中使用SETFILTER进行两个条件以上筛选总报错
string ls_condition1
string ls_condition2
string ls_condition

ls_condition1="sfsc='1'"
ls_condition2="upper(jxbh) like '%"+upper(sle_1.text)+"%'"
if ls_condition2='' then
    if ls_condition1<>'' then
        ls_condition=ls_condition1
    end if
else
    if ls_condition1<>'' then
        ls_condition=ls_condition1+ ' and '+ls_condition2
    else
        ls_condition=ls_condition2
    end if
   
end if
//ls_condition=string(ls_condition)
messagebox(' ',ls_condition)
dw_1.setfilter(ls_condition)
报错EXPRESS IS NOT VALID
2011-02-26 12:23
linzhonglin
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2011-2-21
得分:0 
回复 楼主 linzhonglin
其实错误在于ls_condition1="sfsc='1'"
2011-02-26 12:52
linzhonglin
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2011-2-21
得分:0 
回复 楼主 linzhonglin
ls_condition1="sfsc='1'" 直接写成dw_1.setfilter(sfsc='1')是可以的但写成dw_1.setfilter(ls_condition1)就报错
2011-02-26 12:55
linzhonglin
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2011-2-21
得分:0 
急。。。。。。。请高手帮忙
2011-02-26 12:58
linzhonglin
Rank: 1
等 级:新手上路
帖 子:9
专家分:0
注 册:2011-2-21
得分:0 
回复 4楼 linzhonglin
sfsc字段不存在
2011-02-26 13:23



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-332816-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.386159 second(s), 7 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved