[求助][原创]关于ADODB.Recordset 错误 '800a0e79'
错误描述:ADODB.Recordset 错误 '800a0e79' 对象打开时,不允许操作。
/admin_manager/news_add.asp,行89
代码~(发生错误代码为: rs.open sql,conn,1,1)
<%dlqx=1%>
<!--#include file="check.asp"-->
<!--#include file="conn.asp"-->
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from part order by partID asc"
rs.open sql,conn,1,1
%>
<html>
<head>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("name"))%>","<%= trim(rs("classid"))%>","<%= trim(rs("partid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.partID.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[1] == locationid)
{
document.myform.partID.options[document.myform.partID.length] = new Option(subcat[0], subcat[2]);
}
}
}
</script>
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from part order by partID asc"
rs.open sql,conn,1,1
%>
<html>
<head>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("name"))%>","<%= trim(rs("classid"))%>","<%= trim(rs("partid"))%>");
osition.document.body.innerHTML;}
if(document.myform.text.value.indexOf("file:///")!=-1){e=1;msgg=msgg+"你添加文章中有一处或多处图片或者链接是本地的,这样不能在网页上正常显示,请修改或者把图片上传到服务器";}
if(document.myform.text.value==""){e=1;msgg=msgg+"文章内容不能为空\n";}
if(e==1){alert(msgg);return false;}else{return true;}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
window.open(theURL,winName,features);
}
-->
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="css.css" type="text/css">
<title></title>
</head>
<body bgcolor="#D5D5D5">
<form name="myform" method="post" action="news_save.asp?action=add" onsubmit="return check(myform)" >
<table bgcolor="#e8e8e8" border="0" width="590" bordercolorlight="#000000" cellspacing="0" cellpadding="0" style="border-left: 2 solid #82C130; border-right: 2 solid #82C130">
<tr>
<td width="100%" height="30" background="../webimages/l1.gif"> <p align="center"><b>==广州大学学生会
文章添加==</b> </td>
</tr>
<tr>
<td width="100%" height="30"><img src="mofeiimg/mo_in_email.gif" width="19" height="18">文章类型:
<%
sql = "select * from class"
rs.open sql,conn,1,3
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
<select name="classid" onChange="changelocation(document.myform.classid.options[document.myform.classid.selectedIndex].value)" size="1">
<option selected value="<%=trim(rs("classID"))%>"><%=trim(rs("name"))%></option>
<% dim class1
class1=rs("classID")
rs.movenext
do while not rs.eof
%>
<option value="<%=trim(rs("classID"))%>"><%=trim(rs("name"))%></option>
<%
rs.movenext
loop
end if
rs.close
%>
</select> <select name="partID">
<%sql="select * from part where classID="&class1
rs.open sql,conn,1,1
if not(rs.eof and rs.bof) then
%>
<option selected value="<%=rs("partID")%>"><%=rs("name")%></option>
<% rs.movenext
do while not rs.eof
%>
<option value="<%=rs("partID")%>"><%=rs("name")%></option>
<% rs.movenext
loop
end if
rs.close
set rs = nothing
conn.Close
set conn = nothing
Loop
%>
</select>
** </td>
</tr>
<tr>
<td td width="100%" height="30"> <img src="mofeiimg/mo_in_title.gif" width="12" height="13">
标题:
<input name="title" type="text" id="title">
** </td>
</tr>
<tr>
<td>
<tr>
<td width="100%" height="32"> <img src="mofeiimg/mo_in_email.gif" width="19" height="18">作者:
<input name="writer" type="text" id="writer" value="广州大学学生会">
**</td>
</tr>
<tr>
<td height="36"><img src="mofeiimg/mo_in_email.gif" width="19" height="18">文章来源:
<SELECT name=writefrom size="1">
<OPTION selected value="本站原创">本站原创</OPTION>
<OPTION value="转载" >转载</OPTION>
<OPTION value="网友原创" >网友原创</OPTION>
</SELECT> </td>
</tr>
<tr>
<td height="36"><img src="mofeiimg/mo_in_email.gif" width="19" height="18">文章内容:
<tr>
<td width="409" height="330" colspan="2">
<iframe name="wz" src="editor.htm" height="100%" width="100%" scrolling="no" align="center" border="0" frameborder="0">
浏览器不支持嵌入式框架,或被配置为不显示嵌入式框架。</iframe> <br>
</tr>
<tr>
<td height="40" colspan="2" > <input type="submit" name="Submit" value="提 交">
<input type="reset" name="b2" value="取 消"> </td>
</tr>
<tr>
<td width="746" height="18" background="../webimages/l2.gif"></td>
</tr>
</table><input type="hidden" name="text" value="">
</form></td>
</tr>
</table></td>
</tr>
</table>
<script>
var e;
var msgg;
function fsubmit()
{
addnew();
form1.action="view.asp?chuli=addnew";
form1.target="_blank";
if (e==1){return false;}
else{
form1.submit();
return true;}
}
function addnew()
{
e=0;
msgg="";
if (wz.document.Frm.htmlmode.checked==true){
document.form1.text.value=wz.Composition.document.body.innerText;}
else{
document.form1.text.value=wz.Composition.document.body.innerHTML;} if(document.form1.text.value.indexOf("file:///")!=-1){e=1;msgg=msgg+"你添加文章中有一处或多处图片或者链接是本地的,这样不能在网页上正常显示,请修改或者把图片上传到服务器";}
if(document.form1.mobanlist.value!="0"){document.form1.moban.value=document.form1.mobanlist.value;}
if(document.form1.title.value==""){e=1;msgg=msgg+"文章标题不能为空\n";}
if(document.form1.key.value==""){e=1;msgg=msgg+"文章关键字不能为空\n";}
if(document.form1.text.value==""){e=1;msgg=msgg+"文章内容不能为空\n";}
if(document.form1.writer.value==""){e=1;msgg=msgg+"文章作者不能为空\n";}
if(document.form1.writefrom.value==""){e=1;msgg=msgg+"文章来源不能为空\n";}
if(e==1){alert(msgg);return false;}else{return true;}
}
</script>
</body>
</html>
请问如何修改才能通过呢??