急!!ADODB.Recordset 错误 '800a0bb9'

zhhzhu_it 2007-12-16 11:46:28
请高手帮忙解决!
ADODB.Recordset 错误 '800a0bb9'
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/repairing/Top.asp,行 54

代码如下:
top.asp
<html>
<head>
<title>设备报修管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT language=javascript>
function save_onclick()
{
var strTemp = document.forms.MemCode.value;
if (strTemp.length == "" )
{
alert("请输入用户名!");
document.forms.MemCode.focus();
return false;
}
var strTemp = document.forms.password.value;
if (strTemp.length == "" )
{
alert("请输入密码!");
document.forms.password.focus();
return false;
}
}
</SCRIPT>
</head>
<BODY topmargin=0 leftmargin=0 rightmargin=0 bottommargin=0>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><img src="images/top.gif" width="760" height="100"></td>
</tr>
</table>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center" class="table_southidc">
<tr>
<td height="24" width="1%" align="center"></td>
<td width="30%">
<font color="#000000"><b>
<script language="JavaScript" src="js/date.js" type="text/javascript"></script><script>document.write(+nian)</script>年<script>document.write(+yue)</script>月
<script>document.write(+ri)</script>日 星期<script>document.write(""+week)</script></b></font>
</td>
<td height="25" align="right"><strong>
<a href="Member_Reg.asp"><font color="#000000">用户注册</font></a><font color="#000000"> | <a href="index.asp" ><font color="000000">报修列表</font></a> | </font><a href="Repair.asp" ><font color="#000000">报修登记</font></a><font color="000000"> | <a href="Member_Loginsb.asp"><font color="0000000">注销登录</font></a></font></strong> </td>
<td width="1%" align="right"> </td>
</tr>
</table>
<table width="760" border="1" align="center" cellpadding="5" cellspacing="1" class="td_southidc">
<tr class=>
<td bgcolor="#FFFFFF"><table border=0 cellpadding=0 cellspacing=0 rules=cols width="100%" align="center" height="25">
<tr bgcolor="#FFFFFF">
<td height="25" ><span><strong>
<%if session("MemCode")<>"" then%>
<%
set rs_user=server.createobject("adodb.recordset")
sql="select * from Member where MemCode='"&session("MemCode")&"'"
rs_user.open sql,conn,3,2
%>

<%if rs_user("purview")=1 then%>管理员<%else%>报修用户<%end if%><%=session("MemCode")%>
<%response.write":您好,请把你要申报内容填写清楚!"
else
%>
</strong></span>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form method="post" action="Member_login.asp" name="forms" onSubmit="return save_onclick()">
<tr>
<td align="left">
用户名:
<input name="MemCode" id="MemCode" style="font-size: 9pt; background-color:#CDF0F9" size="10" font face="宋体">
密码:
<input name="password" type="password" id="password" style="font-size: 9pt; background-color:#CDF0F9" size="10" font face="宋体">
<input name="Submit" type="submit" value="登陆">
<input name="Submit" type="reset" value="重置">
</td>
</tr>
</form>
</table>
<%end if%>
</td>
<td class=content9 bgcolor="#FFFFFF" height="25"><p align="right"><a href="Repair.asp" style="text-decoration: none" >报修申请>>></a></td>
</tr>
</table></td>
</tr>
</table>
...全文
2014 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
francis 2007-12-17
  • 打赏
  • 举报
回复
<%
set rs_user=server.createobject("adodb.recordset")
sql="select * from Member where MemCode='"&session("MemCode")&"'"
rs_user.open sql,conn,1,3
'或者rs_user.open sql,conn,1,1
%>
braveboy 2007-12-17
  • 打赏
  • 举报
回复
支持楼上的,如果还是有那个错误,那就把sql语句输出来看看有没有错误
rbwang 2007-12-17
  • 打赏
  • 举报
回复
晕。你的TOP。ASP没有加数据库连接啊
当然会出现这样的错误!

<!--#include   file   ="inc/conn.asp"-->

把这一句加上吧!
zhhzhu_it 2007-12-16
  • 打赏
  • 举报
回复
index.asp代码
<!--#include file ="Top.asp"-->
<!--#include file ="inc/conn.asp"-->
<!--#include file ="inc/head.asp"-->
<%
sql="select * from Orders order by OrderID desc"
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,1

rs.pagesize=""&topshu&""
'实现分页
if rs.Eof then
rs_total = 0
else
rs_total = rs.RecordCount
end if
dim pageno
maxpage=rs.pagecount
getpageno = (Request("pageno"))
if(getpageno = "")then
pageno = 1
else
pageno = getpageno
End if
if(not rs.Eof)then
rs.AbsolutePage = pageno
end if
%>
<%if session("MemCode")="" then%>
<table width="760" border="1" align="center" cellpadding="0" cellspacing="0">
<tr class="table_southidc">
<td width="105" height="30" align="center"><strong> 报修编号</strong></td>
<td width="75" height="30" align="center"><strong> 部门或班级</strong></td>
<td width="245" align="center"><strong>报修原因</strong></td>
<td width="70" align="center"><strong>报修物品</strong></td>
<td width="50" height="30" align="center"><strong>报修人</strong></td>
<td width="70" align="center"><strong>报修时间</strong></td>
<td width="60" height="30" align="center"><strong>维修状态</strong></td>
<td width="70" align="center"><strong>维修时间</strong></td>
</tr>
<tr>
<td height="120" colspan="9" align="center">你还没登陆</td>
</tr>
</table>
<%else%>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="table_southidc">
<td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tr_southidc">
<tr class="table_southidc">
<td width="105" height="30" align="center"><strong> 报修编号</strong></td>
<td width="75" height="30" align="center"><strong> 部门或班级</strong></td>
<td width="245" align="center"><strong>报修原因</strong></td>
<td width="70" align="center"><strong>报修物品</strong></td>
<td width="50" height="30" align="center"><strong>报修人</strong></td>
<td width="70" align="center"><strong>报修时间</strong></td>
<td width="60" height="30" align="center"><strong>维修状态</strong></td>
<td width="70" align="center"><strong>维修时间</strong></td>
</tr>
<%
If(rs.Eof)Then
%>
<tr>
<td height="120" colspan="9" align="center">没有报修记录!</td>
</tr>

<%
Response.End()
End If
repeat_rows = 0
While(repeat_rows < rs.PageSize and Not rs.Eof)
%>
<%OrderID=rs("OrderID")%>
<tr>
<td width="105" height="30" align="center"><a href="repair_list.asp?OrderID=<%=OrderID%>"><font color="#0099FF"><%=rs("OrderID")%></font></a></td>
<td width="75" height="30" align="center">
<% OrderID=cint(request("OrderID"))
set rs_s=server.CreateObject("adodb.recordset")
sql="select * from SmallClass_Dept where SmallClassID="&rs("DepSmallClassID")&" order by BigClassID"
rs_s.open sql,conn,1,1
%>
<%=rs_s("SmallClassName")%>
<%
rs_s.close
set rs_s=nothing
%>
</td>
<td width="245" height="30" align="center">
<%
If(Len(rs("Reason")) > 12)Then
Response.Write("<a href='repair_list.asp?OrderID="&rs("OrderID")&"'>"&(Mid(rs("Reason"),1,12))&"…</a>")
Else
Response.Write("<a href='repair_list.asp?OrderID="&rs("OrderID")&"'>"&(rs("Reason"))&"</a>")
End If
%>
</td>
<td width="70" height="30" align="center">
<% OrderID=cint(request("OrderID"))
set rs_s=server.CreateObject("adodb.recordset")
sql="select * from SmallClass_Goods where SmallClassID="&rs("GoSmallClassID")&" order by BigClassID"
rs_s.open sql,conn,1,1
%>
<%=rs_s("SmallClassName")%>
<%
rs_s.close
set rs_s=nothing
%></td>
<td width="50" height="30" align="center"><%=rs("MemName")%></td>
<td width="70" align="center"><%=rs("StartTime")%></td>
<td width="60" height="30" align="center"><%if rs("State")<>"" then%><font color="#FF0000"><%=rs("State")%></font><%else%><b>×</b><%end if%></td>
<td width="70" align="center" class="TableBody1"><%if rs("State")<>"" then%><font color="#FF0000"><%=rs("EndTime")%></font><%else%><b>×</b><%end if%></td>
</tr>
<%
repeat_rows = repeat_rows + 1
rs.MoveNext
Wend
%>
</table>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr class="tr_southidc">
<td width="302" height="30">[<font color=red><%=pageno%></font>/<%=rs.PageCount%>] 每页<font color=red><%=rs.PageSize%></font>条 共<font color=red><%=rs_total%></font>条记录 </td>
<td width="171"> </td>
<td width="277"><span>
</span>
<div align="right">
<table width="100" height="20" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="96" align="right"><%for i=1 to maxpage%>
[<a href="index.asp?pageno=<%=i%>"><%=i%></a>]
<%next%> </td>
</tr>
</table>
</div>
<%
rs.close
Set rs = Nothing
%></td>
</tr>
</table>
</td>
</tr>
<%end if%>
</table>

28,391

社区成员

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

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