你的 dingdan 字段是什么类型的?如果是数字类型的,就使用
<%
dingdan=request.form("dingdan")
if dingdan<>"" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_action where dingdan="&dingdan&"",conn,1,1
if rs.eof and rs.bof then
response.write "<script>alert('此订单号不存在!');history.go(-1);</script>"
response.end
end if
rs.close
set rs=nothing
else
response.write "<script>alert('订单号不能为空!');history.go(-1);</script>"
end if
%>
<%
dingdan=request.form("dingdan")
if dingdan<>"" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_action where dingdan="&dingdan&"",conn,1,1
if rs.eof and rs.bof then
response.write "<script>alert('此订单号不存在!');history.go(-1);</script>"
response.end
end if
rs.close
set rs=nothing
else
response.write "<script>alert('订单号不能为空!');history.go(-1);</script>"
end if
%>
[编程论坛] ASP超级群:49158383 敲门暗号:ASP编程
龍艺博客 http://www.