数据搜索的问题,很简单,但就是不知道问题出现再那里,程序已出各位帮帮忙吧,在线等候,
我现在已经创建了一个数据窗口,用直接选择的方式来进行选择。ddlb_1,ddlb_2。他们下面各有几个item。现在我用来搜索,语句如下:
string conditions
string lookfortext1,lookfortext2,operator
string lookforwhat1,lookforwhat2
operator="and"
lookfortext1=ddlb_1.text
lookfortext2=ddlb_2.text
conditions=""
if lookfortext1<>"" then
lookfortext1="cat"
lookforwhat1="ddlb_1.item"
end if
if lookfortext2<>"" then
lookfortext2="country"
lookforwhat2="ddlb_2.item"
end if
if lookfortext1<>"" then
conditions=lookfortext1+lookforwhat1
elseif lookfortext2<>"" then
conditions=conditions+operator+lookforwhat2+lookfortext2
end if
dw_1.setfilter(conditions)
filter(dw_1)
dw_1.retrieve()
if dw_1.rowcount()=0 then
messagebox("提示","查无此记录,重试!")
end if
在运行的时候,系统就提示出错信息expression is not valid!
搜索出来的信息根本就不是那回事!
帮我吧!朋友!高手,高高手!