
网站后台出错,上传好的新闻后无法修改,修改新闻点击提交就报错: 100
错误类型:ADODB.Recordset(0x800A0BCD)BOF或EOF中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。/slpc/admi...
错误类型:
ADODB.Recordset (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/slpc/admin1/admin_inform_modifysave.asp, 第 72 行
代码如下:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
%>
<!--#include file="../admin1/inc/conn.asp"-->
<!--#include file="../admin1/inc/config.asp"-->
<!--#include file="../admin1/Admin_ChkPurview.asp"-->
<%
Dim sContent1, i1, isok, rs, sql,fl,fld
For i1 = 1 To Request.Form("content1").Count
sContent1 = sContent1 & Request.Form("content1")(i1)
Next
isok = true
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../manage.css" type="text/css">
</head>
<body bgcolor="" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" height="43" width="80%">
<tr>
<td height="43"><div align="center"> <br>
<p>
<%
if request.form("ftitle") = "" then
isok = false
%>
</p>
<p><font color="#FF0000">请填写新闻标题!</font></p>
<%
end if
if request.form("fdate") = "" or (not isdate(request.form("fdate"))) then
isok = false
%>
<p><font color="#FF0000">没有填写发布日期或日期格式不正确!</font></p>
<p>
<%
end if
if isok = false then
%>
<a href="JavaScript:history.go(-1)">返回重新填写</a>
<%
end if
if isok then
if isok then
set rs=server.createobject("adodb.recordset")
fld=request.QueryString("fl")
select case fld
case "咨询专区"
sql="select * from zl where id = " & request.form("tempid")
case "普查简报"
sql="select * from fx where id = " & request.form("tempid")
case "执法监督"
sql="select * from sz where id = " & request.form("tempid")
case "工作动态"
sql="select * from szy where id = " & request.form("tempid")
case "基础研究"
sql="select * from yj where id = " & request.form("tempid")
case "水利经济"
sql="select * from jj where id = " & request.form("tempid")
case "普查简报"
sql="select * from rn where id = " & request.form("tempid")
end select
rs.open sql,conn,1,3
rs("ftitle") = request.form("ftitle")
rs("ftext") = sContent1
rs("fdate") = request.form("fdate")
rs("froot")=request.form("froot")
rs.update
rs.close
set rs=nothing
response.redirect("admin_inform_list.asp?fl="&fld)
end if
response.redirect("admin_inform_list.asp?fl="&fld)
end if
%>
</div></td>
</tr>
</table>
</div>
</body>
</html>
我要修改代码,重根本上完成。 展开
ADODB.Recordset (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/slpc/admin1/admin_inform_modifysave.asp, 第 72 行
代码如下:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
%>
<!--#include file="../admin1/inc/conn.asp"-->
<!--#include file="../admin1/inc/config.asp"-->
<!--#include file="../admin1/Admin_ChkPurview.asp"-->
<%
Dim sContent1, i1, isok, rs, sql,fl,fld
For i1 = 1 To Request.Form("content1").Count
sContent1 = sContent1 & Request.Form("content1")(i1)
Next
isok = true
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="../manage.css" type="text/css">
</head>
<body bgcolor="" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div align="center">
<table border="0" cellpadding="0" cellspacing="0" height="43" width="80%">
<tr>
<td height="43"><div align="center"> <br>
<p>
<%
if request.form("ftitle") = "" then
isok = false
%>
</p>
<p><font color="#FF0000">请填写新闻标题!</font></p>
<%
end if
if request.form("fdate") = "" or (not isdate(request.form("fdate"))) then
isok = false
%>
<p><font color="#FF0000">没有填写发布日期或日期格式不正确!</font></p>
<p>
<%
end if
if isok = false then
%>
<a href="JavaScript:history.go(-1)">返回重新填写</a>
<%
end if
if isok then
if isok then
set rs=server.createobject("adodb.recordset")
fld=request.QueryString("fl")
select case fld
case "咨询专区"
sql="select * from zl where id = " & request.form("tempid")
case "普查简报"
sql="select * from fx where id = " & request.form("tempid")
case "执法监督"
sql="select * from sz where id = " & request.form("tempid")
case "工作动态"
sql="select * from szy where id = " & request.form("tempid")
case "基础研究"
sql="select * from yj where id = " & request.form("tempid")
case "水利经济"
sql="select * from jj where id = " & request.form("tempid")
case "普查简报"
sql="select * from rn where id = " & request.form("tempid")
end select
rs.open sql,conn,1,3
rs("ftitle") = request.form("ftitle")
rs("ftext") = sContent1
rs("fdate") = request.form("fdate")
rs("froot")=request.form("froot")
rs.update
rs.close
set rs=nothing
response.redirect("admin_inform_list.asp?fl="&fld)
end if
response.redirect("admin_inform_list.asp?fl="&fld)
end if
%>
</div></td>
</tr>
</table>
</div>
</body>
</html>
我要修改代码,重根本上完成。 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询