Microsoft VBScript 运行时错误 (0x800A000D)
edit_class.asp<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body vLink=#000000 bgColor=#cad7f7>
<table width="655" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
<tr>
<td width="655" height="30">
<table width="654" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="17" colspan="4"> </td>
</tr>
<%
set rs=server.CreateObject("ADODB.Recordset")
sql="select class_id,class_name,term_class from Class"
rs.open sql,conn,1,3
rs.pagesize=10
if rs.eof then
rs_total=0
else
rs_total=rs.recordcount
end if
dim pageno
maxpage=rs.pagecount
getpageno=(request.QueryString("pageno"))
if request.QueryString("pageno")="" then
pageno=1
else
if request.QueryString("pageno")>rs_total then
pageno=rs_total
end if
pageno=getpageno
end if
if not rs.eof then
rs.absolutepage=pageno
end if
%>
<tr>
<td height="30" colspan="4">
<%for i=1 to maxpage%>
<a href="edit_class.asp?pageno=<%=i%>"><%=i%></a>
<% next %></td>
</tr>
<tr>
<td width="39" height="30"><div align="center">ID</div></td>
<td width="233"><div align="center">课程/环节</div></td>
<td width="196"><div align="center">学年学期</div></td>
<td width="186"><div align="center">操作</div></td>
</tr>
</table></td>
</tr>
<tr>
<td height="30"><table width="641" border="0" cellpadding="0" cellspacing="0">
<% i=1
do while not rs.eof
if i>rs.pagesize then exit do end if%>
<tr>
<td width="41" height="30"> <%=rs("class_id")%></td>
<td width="232"> <%=rs("class_name")%></td>
<td width="195"> <%=rs("term_class")%></td>
<td width="173" align="center" bgcolor="#CCCCCC" style="PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 1px; PADDING-TOP: 1px; BORDER-BOTTOM: #000000 1px dotted">『 <A href="delete_class.asp?class_id=<%=rs("class_id")%>" onclick="return confirm('确认要删除此行信息吗?')">删除</A> 』 『 <A href="save_class_infor.asp?class_id=<%=rs("class_id")%>">修改</A> 』</td>
</tr>
<%
i=i+1
rs.movenext
loop
%>
</table></td>
</tr>
<tr>
<td height="30"> </td>
</tr>
save_class_infor.asp
<!--#include file="conn.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<form name="form1" method="post" action="save_class.asp">
<table width="500" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="138" height="13"><div align="center">ID:</div></td>
<td height="25" colspan="2"> <%=rs("class_id")%></td>
</tr>
<tr>
<td height="25"><div align="center">课程环节:</div></td>
<td height="25" colspan="2"><input type="text" name="class_name" id="class_name" value="<%=rs("class_name")%>" ></td>
</tr>
<tr>
<td height="12"><div align="center" >学年学期:</div> </td>
<td height="12" colspan="2"><input type="text" name="term_class" id="term_class" value="<%=rs("term_class")%>"></td>
</tr>
<tr>
<td height="25"> </td>
<td width="276" height="25"> </td>
<td width="86"><input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
</form>
</body>
</html>
</table>
</body>
</html>
错误原因是:
Microsoft VBScript 运行时错误 (0x800A000D)
类型不匹配: 'rs'
麻烦问一下是什么原因呢?谢谢!