下拉数据窗口无法正确获取数据
数据窗口dw_1中的字段wjjxh,在EDIT中设置了下拉数据窗口,下拉数据窗口d_wjjhselect的SQL如下:
long ll_ret
datawindowchild ldwc_1
ll_ret = this.getchild('wjjxh' , ldwc_1)
ldwc_1.setfilter("wjgh ='"+gs_wjgh+"'" + "and not xh ='"+string(gi_wjjxh)+"'")
ldwc_1.filter()
SELECT wjjdy.wjgh,
wjjdy.wjjmc,
wjjdy.xh,
wjjdy.flid
FROM wjjdy
where wjgh = '001' and xh <> 74;
ldwc_1.filter()
或
long ll_ret
datawindowchild ldwc_1
ll_ret = this.getchild('wjjxh' , ldwc_1)
ldwc_1.setfilter("(wjgh ='"+gs_wjgh+"'" + ") and not (xh ='"+string(gi_wjjxh)+"')")
ldwc_1.filter()