大家快来帮帮忙!小弟在这里谢谢了!

chang1216 2003-08-22 02:20:30
ADODB.Recordset 错误 '800a0e7d'
连接无法用于执行此操作。在此上下文中它可能已被关闭或无效。

/liuyan/mail/login.asp,行 32
这是怎么回事?这是什么错误?谢谢!

...全文
49 12 打赏 收藏 转发到动态 举报
写回复
用AI写文章
12 条回复
切换为时间正序
请发表友善的回复…
发表回复
chang1216 2003-08-27
  • 打赏
  • 举报
回复
谢谢楼上的兄弟!
wjh6of6agriculture 2003-08-24
  • 打赏
  • 举报
回复
估计是conn有错,单独创建recordset对象会错吗?如果不会就是CONN错了,一步一步测着看,总会找的问题的!
chang1216 2003-08-24
  • 打赏
  • 举报
回复
大家怎么了?帮帮我啊?谢谢了!
chang1216 2003-08-22
  • 打赏
  • 举报
回复
为什么没有人回答我的问题!谢谢大家了帮我看看!
chang1216 2003-08-22
  • 打赏
  • 举报
回复
这个程序我在用access数据库时好使现在连的是sql数据库
提示ADODB.Recordset 错误 '800a0e7d'
连接无法用于执行此操作。在此上下文中它可能已被关闭或无效。
/liuyan/mail/login.asp,行 32
就是rs1.open sql,conn,1,1这一行
谢谢大家 我比较急谢谢了!


xiejunhua 2003-08-22
  • 打赏
  • 举报
回复
提示出错是哪行,标注一下,另外输出这几个值看可否正常。

action,c_name,c_password

request("action")="登录"
c_name=trim(request("c_name"))
c_password=trim(request("c_password"))
zjg791015 2003-08-22
  • 打赏
  • 举报
回复
把你<!--#include file="../conn.asp"--> 中conn.asp的代码也贴出来,估计是数据库的连接字串有错误。
chang1216 2003-08-22
  • 打赏
  • 举报
回复
<!--#include file="../conn.asp"-->
head>
<script LANGUAGE="JavaScript">
<!--
function openwin() { window.open ("findpwd.asp", "newwindow", "height=400, width=650, top=100,left=200,toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no") }
//-->
</script>
</head>


<table align="center" border="1" cellpadding=0 cellspacing=0 width="43%" bordercolor="#e7e9ef" >
<form name="c_name" method="post" action="">
<%
dim c_name
dim c_password
if request("action")="登录" then
c_name=trim(request("c_name"))
c_password=trim(request("c_password"))
if c_name<>"" and c_password<>"" then
sql="select * from user_login where c_name='" & c_name & "' and c_password='" & c_password & "'"
'response.Write(sql)
'response.end
set rs1=server.CreateObject("adodb.recordset")
'set rs1=rs(sql,conn)
rs1.open sql,conn,1,1
if not rs1.eof then
if c_password=rs1("c_password") then
session("admin")=rs1("c_name")
response.Redirect("mail.asp")
end if
else %>
<script language=javascript>alert("您的用户名称或密码不正确!")</script>
<% end if
end if
end if

%>
<tr>
<td width="100%" height="19" colspan="3" align="center">会员登陆</td>
</tr>
<br>
<tr>
<td width="25%" colspan="3" align="center"> 用户名:
<input type="text" maxlength=10 size=20 name="c_name" value=<%=request("c_name")%>></td>
</tr>
<tr>
<td width="75%" colspan="3" align="center">密  码:
<input type="c_password" maxlength=10 size=20 name="c_password" value=<%=request("c_password")%>>
</td>
</tr>
<tr>
<td colspan="3" align="center"><input name="action" type="submit" value="登录">
  
<input type="reset" name="Submit" value="重置"> </tr>
<tr class="hzxtitle">
<td><a href="yonghu.asp">个人会员注册</a></td>
<td><a href="yonghu1.asp">旅行社会员注册</a></td>
<td><a href="#" onclick="openwin()">找回密码</a></td>
</tr>
</form>
</table>
请问错在哪里啊?谢谢了!
xiejunhua 2003-08-22
  • 打赏
  • 举报
回复
帖出原代码让大家帮你看呀!
7758iloveu 2003-08-22
  • 打赏
  • 举报
回复
请帖出原代码。
ceocio 2003-08-22
  • 打赏
  • 举报
回复
请帖出详细出错代码。
pp4u 2003-08-22
  • 打赏
  • 举报
回复
没有连接到数据库
看这段代码前面是不是close了。

28,390

社区成员

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

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