请指点下哪里出错了

xhdong123 2010-05-27 10:45:32
<%
set rs=server.CreateObject("ADODB.recordset")
sql="select * from stock"
rs.open sql,adocon,1,3
%>
<%
if request("subb")="查询" then
session("sel")=request("sel")
session("tj")=request("tj")
session("mname")=request("mname")
end if
%>
<%
set rs=server.CreateObject("ADODB.recordset")
sql="select * from stock"
'查询条件判断
if session("tj")="=" then
sql="select * from stock where "&session("sel")&" = '"&session("mname")&"'"
end if
if session("tj")="like" then
sql="select * from stock where "&session("sel")&" like '%"&session("mname")&"%'"
end if
if (session("tj")=">"and session("sel")="kcsl") then
sql="select * from stock where "&session("sel")&" > "&session("mname")&""
else if (session("tj")=">") then
sql="select * from stock where "&session("sel")&" > '"&session("mname")&"'"
end if
end if
if (session("tj")="<" and session("sel")="kcsl") then
sql="select * from stock where "&session("sel")&" < "&session("mname")&""
else if (session("tj")="<") then
sql="select * from stock where "&session("sel")&" < '"&session("mname")&"'"
end if
end if
rs.open sql,adocon,1,3
%>
<%if rs.eof then
Response.Write "<script language='javascript'>alert('系统提示:暂时没有您要找的数据!');location='mytj.asp?action=good';</script>"
'response.write "<div align=center><font color=red>对不起!暂时没有您要找的数据!</font></div>"
response.end
end if
%>
<%
set rs1=server.CreateObject("adodb.recordset")
strsql="select Distinct papername,sum(befellsum) as total from stock Group By papername Having "&session("sel")&" = '"&session("mname")&"' or "&session("sel")&" like '%"&session("mname")&"%'"
rs1.open strsql,adocon,1,3
%>
...全文
51 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
xhdong123 2010-05-27
  • 打赏
  • 举报
回复
错误类型:
Microsoft JET Database Engine (0x80040E21)
试图执行的查询中不包含作为合计函数一部分的特定表达式 'currency='结清201004' Or currency ALike '%结清201004%''
sxdtlcx 2010-05-27
  • 打赏
  • 举报
回复
你应该说清楚。是什么错误。这样谁懒得看。。。
浏览器没有提示吗?

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧