得到值..............
..................
sql = "select * userno,clipno,clipPhone,cliptime,schoolno,createtime from bus_y "
if len(Userno)>0 then
strSql = strSql & "| Userno = '" & Userno & "' |"
end if
if len(clipno)>0 then
strSql = strSql & "| clipno = '" & clipno & "' |"
end if
if len(schoolNo)>0 then
strSql = strSql & "| schoolNo = '" & schoolNo & "' |"
end if
'学生卡号码
if len(clipphone)>0 then
strSql = strSql & "| clipphone = '"& clipphone &"' |"
end if
'形成SQL语句
if len(strSql) > 0 then
strSql = left(strSql,len(strSql)-1)
strSql = replace(strSql,"||","and")
strsql = replace(strSql,"|"," where ")
end if