| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 391 人关注过本帖
标题:参数传递不了
只看楼主 加入收藏
iceboo
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2006-10-13
收藏
 问题点数:0 回复次数:2 
参数传递不了

页面代码如下(简化后)
<%
id=request("id")
if id="" then
response.write "请从正确路径访问本站"
response.end
end if
%>
<!--#include file="mdb.asp"-->

<%
sql="select * from abc where id="&id+1
rs.open sql,conn,1,1
if rs.bof or rs.eof then
response.write "<br>该内容已经删除或者不存在"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
end if

rs("count")=rs("count")+1
rs.update
%>
<%=rs("name")%>
<%
rs.close
set rs=nothing
conn.close
set conn = nothing
%>

数据库有内容但是用参数传递到该页面以后还是显示:该内容已经删除或者不存在
删除:if rs.bof or rs.eof then
response.write "<br>该内容已经删除或者不存在"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
end if
以后也没有反应,甚至COUNT也不更新

搜索更多相关主题的帖子: 参数 
2006-11-09 00:39
gdk2006
Rank: 4
等 级:业余侠客
威 望:8
帖 子:928
专家分:270
注 册:2006-7-2
收藏
得分:0 
以下是引用iceboo在2006-11-9 0:39:27的发言:

页面代码如下(简化后)
<%
id=request("id")
if id="" then
response.write "请从正确路径访问本站"
response.end
end if
%>
<!--#include file="mdb.asp"-->

<%
sql="select * from abc where id="&id+1
rs.open sql,conn,1,1
if rs.bof or rs.eof then
response.write "<br>该内容已经删除或者不存在"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
end if

rs("count")=rs("count")+1
rs.update
%>
<%=rs("name")%>
<%
rs.close
set rs=nothing
conn.close
set conn = nothing
%>

数据库有内容但是用参数传递到该页面以后还是显示:该内容已经删除或者不存在
删除:if rs.bof or rs.eof then
response.write "<br>该内容已经删除或者不存在"
rs.close
set rs=nothing
conn.close
set conn=nothing
response.end
end if
以后也没有反应,甚至COUNT也不更新

这句红色的SQL语句是什么意思。是将你的ID加1在去查找吗!


程序员的悲哀如何找女朋友?
追女解决方案百度“让她着迷”!
2006-11-09 08:40
iceboo
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2006-10-13
收藏
得分:0 
不好意思,那一句是我复制的时候复制错了,后面没有+1

游戏,美女,网赚,还有小电影 有时间到我的论坛做客哦 http://www.
2006-11-09 13:46
快速回复:参数传递不了
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011552 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved