string ls_select,ls_txm,ls_bh,ls_xm,is_sql
int il_rowcount
ls_txm = trim(sle_1.text) // 拼音码
ls_bh = trim(sle_2.text) // 编号
ls_xm = trim(sle_3.text) // 名称
ls_select =""
// 拼音码
if not isnull(ls_txm) and ls_txm <> "" then
ls_txm = "%" + ls_txm + "%"
ls_select = ls_select + " pym LIKE '" + ls_txm + "'"
end if
// 编号
if not isnull(ls_bh) and ls_bh <> "" then
ls_bh = "%" + ls_bh + "%"
if ls_select = "" then
ls_select = " bh LIKE '" + ls_bh + "'"
else
ls_select = ls_select + " AND bh LIKE '" + ls_bh + "'"
end if
end if
// 名称
if not isnull(ls_xm) and ls_xm <> "" then
ls_xm = "%" + ls_xm + "%"
if ls_select = "" then
ls_select = " mz LIKE '" + ls_xm + "'"
else
ls_select = ls_select + " AND mz LIKE '" + ls_xm + "'"
end if
end if
messagebox('','第'+ls_select+'行!')
dw_1.setfilter(ls_select)
dw_1.filter()
il_rowcount=dw_1.retrieve()
st_5.text = string(il_rowcount)
sle_1.text=""
sle_2.text=""
sle_3.text=""
过滤一个的时候没问题。。但二个一起过滤。或三个一起过滤。。就报错。。望大侠们帮忙。谢谢