招商城市主场小区:Microsoft JET Database Engine (0x80040E07) 标准表达式中数据类型不匹配。请高手指教!

来源:百度文库 编辑:中科新闻网 时间:2024/05/06 02:53:29
页面代码是这样的:
<%
dim sql,str,memberPrice,productS,province,rs
dim pages,records,currentpage,linenumber,line,p
productS=request("productSort")
memberPrice=request("memberPrice")
province=request("pro")

set rs=server.createObject("adodb.recordset")
if memberprice="请选择价格" then
sql="select * from product where productSort like '%"&productS&"%' and pro like '%"&province&"%'"
else if memberPrice="20000元以下" then
sql="select * from product where clng(memberPrice)<20000 and productSort like '%"&productS&"%' and pro like'%"&provinve&"%'"
else if memberPrice="20001元-50000元" then
sql="select * from product where clng(memberPrice)>=20001 and clng(memberPrice)<50000 and productSort like '%"&productS&"%' and pro like'%"&provinve&"%'"
else if memberPrice="50001元-80000元" then
sql="select * from product where clng(memberPrice)>=50001 and clng(memberPrice)<80000 and productSort like '%"&productS&"%' and pro like'%"&provinve&"%'"
else if memberPrice="80001元-120000元" then
sql="select * from product where clng(memberPrice)>=80001 and clng(memberPrice)<120000 and productSort like '%"&productS&"%' and pro like'%"&provinve&"%'"
else if memberPrice="120001元-200000元" then
sql="select * from product where clng(memberPrice)>=120001 and clng(memberPrice)<200000 and productSort like '%"&productS&"%'and pro like'%"&provinve&"%'"
else if memberPrice="200001元以上" then
sql="select * from product where clng(memberPrice)>=200001 and productSort like '%"&productS&"%'and pro like'%"&provinve&"%'"
end if
end if
end if
end if
end if
end if
end if
rs.open sql,conn,3,2 ------------------这是出错行
出错信息:
Microsoft JET Database Engine (0x80040E07)
标准表达式中数据类型不匹配。
/zb/selljg.asp, 第 33 行

sql 语句有问题
你选择的那个做的查询?找对应的语句
里边的数据类型辨别一下 字符和数字 弄混了