求教!!ADODB.Recordset 错误 '800a0e79' 对象打开时,不允许操作

robert221 2009-11-02 12:54:42
ADODB.Recordset 错误 '800a0e79'
对象打开时,不允许操作


代码入下:


<!--#include file="inc/conn1.asp"-->
<!--#include file="news.asp"-->
<!--#include file="sys_product.asp"-->
<%

set rs=server.CreateObject("adodb.recordset")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<link href="css/css.css" rel="stylesheet" type="text/css" />
<script language="javascript" src="scripts/ggcj.js"></script>
</head>

<body>
<div id="container">
<div id="header">
<div id="search">
<!--#include file="top.asp"-->
</div>
</div>
<div id="content">
<div id="columnleft">
<!--#include file="left.asp"-->
</div>

<div id="main">
<div class="con">
<%
dim txtID,strSQL
txtID=request.QueryString("PhotoID")
if isChkInteger(txtID)=false then
response.Write("<script language='javascript'>alert('参数出错');history.back();</script>")
response.end
end if
strSQL="select Pro_name,B_img,content,Pro_Size,Pro_Price from Product where id="&txtID
rs.open strSQL,conn,1,1
if rs.eof then
response.Write("<script language='javascript'>alert('无相关信息');history.back();</script>")
response.end
else

%>
<div class="product">
<ul class="tit"><h2>产品展示</h2></ul>
<div id="proview">
<ul class="tit"><%=rs(0)%></ul>
<ul class="pic"><a href="<%=rs(1)%>"><img src="<%=rs(1)%>" width="450" border="0" align="middle"></a></ul>
<ul class="desc">
<li class="bit">产品说明:</li>
<li class="detail"><P><FONT size=2>商品型号:<%=rs(3)%></FONT></P>
<P><FONT size=2><%=rs(2)%></FONT></P></li>
</ul>
</div>
</div>
<%
free conn,rs
end if
%>
</div>
</div>
<hr class="hx"/>
</div>
<div id="bottom"><!--#include file="bottom.asp"--></div>
<div style="clear:both;"></div>
</div>
</body>
</html>
...全文
213 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
shenchendt 2009-11-03
  • 打赏
  • 举报
回复
<!--#include file="inc/conn1.asp"--> 把这完整贴出来,还有free conn,rs 是不是写错了,
如果没有分,是没人理你的
robert221 2009-11-02
  • 打赏
  • 举报
回复
没有人理睬我吗?

28,406

社区成员

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

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