ADODB.Field 错误 '800a0bcd'

x4aaaa 2009-07-10 05:30:07
ADODB.Field 错误 '800a0bcd'

BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

/bbs_py/writenew.asp,行 39

这个问题怎样解决啊?我面对这个束手无策了!怎样修改麻烦大家帮忙出点主意

<!--#include file="top.asp"-->
<%

if session("user_name")="" and session("user_pass")="" then

response.write"<SCRIPT language=JavaScript>alert('没有注册或登陆!');"
response.write"location.href='showuser.asp'</SCRIPT>"
response.end
end if
%>

<%session("new")="new"%>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center"style="BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid" bgcolor="#64B3D9" >
<tr>
<td> <SCRIPT language=JavaScript>
function FrontPage_Form1_Validator(theForm)
{
if (theForm.name.value == "")
{
alert("能告诉我你是谁吗?");
theForm.name.focus();
return (false);
}
if (theForm.title.value == "")
{
alert("病症概述不能为空!");
theForm.title.focus();
return (false);
}

return (true);
}
</script>
<%
exec="select * from user where name='"&session("user_name")&"'"
Set RS = Server.CreateObject("ADODB.RecordSet")
rs.Open exec, Conn, 1, 2

name=rs("name")
pass=rs("pass")
zsxm=rs("zsxm")
xb=rs("xb")
dianhua=rs("dianhua")
suoji=rs("suoji")
youbian=rs("youbian")
dizi=rs("dizi")
ll=rs("ll")

%>
<form method="POST" action="addnews.asp" name="form1" onsubmit="return FrontPage_Form1_Validator(this)">
<br>
<table border="0" width="98%" cellspacing="1" cellpadding="3" bordercolorlight="#FFE8E8" bordercolordark="#FFFFFF" align="center" bgcolor="#205E7B">
<tr>
<td height="25"><b><font color="#FFFFFF">  陈述病情 </font></b>
</td>
<td style="color:#ffffff" colspan=2><MARQUEE onMouseOver="if (document.all!=null){this.stop()}"
onmouseout="if (document.all!=null){this.start()}" scrollAmount=4
scrollDelay=150><%

sql="select top 3 * from smallpager where s_conten='病案提交' order by id desc"
Set rs= Server.CreateObject("ADODB.RecordSet")
rs.Open sql, Conn, 1, 2
if rs.eof then
response.write"暂时没有公告"
else
do while not rs.eof
name=" "&rs("user_name")&"说:"
title=rs("s_title")&"    "
response.write title
rs.movenext
loop
rs.close
set rs=nothing
end if %></MARQUEE></td>
</tr>
<tr>
<td width="16%" align="center" bgcolor="#92C8E2">病症概述:</td>
<td colspan="2" bgcolor="#92C8E2">
<input type="hidden" name="name" size="20" maxlength="15" value="<%=session("user_name")%>">
<input type="hidden" name="pass" size="20" maxlength="15" value="<%=pass%>">
<input type="hidden" name="xb" size="20" maxlength="15" value="<%=xb%>">
<input type="hidden" name="dianhua" size="20" maxlength="15" value="<%=dianhua%>">
<input type="hidden" name="suoji" size="20" maxlength="15" value="<%=suoji%>">
<input type="hidden" name="ll" size="20" maxlength="15" value="<%=ll%>">
<input type="hidden" name="youbian" size="20" maxlength="15" value="<%=youbian%>">
<input type="hidden" name="dizi" size="20" maxlength="15" value="<%=dizi%>">

<input type="text" name="title" size="50" maxlength="40" >
(标题限制 <b>20</b> 个汉字以内)<font color="#FF0000">*</font></td>
</tr>
<tr>
<td width="16%" align="center" bgcolor="#DAEDF5">选择表情:</td>
<td colspan="2" bgcolor="#DAEDF5">
<% for i=0 to 17 %>
<input type="radio" value="<%=(i)%>" name="pic" <%if i=0 then response.write "checked"%>>
<img src="<%="title/face" &(i) & ".gif"%>" >  
<%if i>0 and ((i+1) mod 9=0) then response.write "<br>"%>
<%next%>
</td>
</tr>
<tr>
<td width="16%" align="center" bgcolor="#92C8E2">
<select name="face" size=1 onChange="document.images['idface'].src=options[selectedIndex].value;" >
<option selected value="images/01.gif">用户头像-01
<option selected value="images/02.gif">用户头像-02
<option selected value="images/03.gif">用户头像-03
<option selected value="images/04.gif">用户头像-04
<option selected value="images/05.gif">用户头像-05
<option selected value="images/06.gif">用户头像-06
<option selected value="images/07.gif">用户头像-07
<option selected value="images/08.gif">用户头像-08
<option selected value="images/09.gif">用户头像-09
<option selected value="images/10.gif">用户头像-10
<option selected value="images/11.gif">用户头像-11
<option selected value="images/12.gif">用户头像-12
<option selected value="images/13.gif">用户头像-13
<option selected value="images/14.gif">用户头像-14
<option selected value="images/15.gif">用户头像-15
<option selected value="images/16.gif">用户头像-16
<option selected value="images/17.gif">用户头像-17
<option selected value="images/18.gif">用户头像-18
<option selected value="images/19.gif">用户头像-19
<option selected value="images/20.gif">用户头像-20
</select>
<img id=idface src="images/01.gif" alt=个人形象代表> </td>
<td valign="top" colspan="2" bgcolor="#92C8E2">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
详细病况、病史及以往治疗情况<br>
<textarea name="nei" style="display:none"><br><br><br>病案提交目的:</textarea>
<iframe ID="bbs" src="edit/ewebeditor.asp?id=nei&style=bbs" frameborder="0" scrolling="no" width="100%" HEIGHT="350"></iframe>



</td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" >
<p align="center">
<input type="submit" value=" 提交 " name="B1" >
   
<input type="reset" value=" 清除 " name="B2" >
</td>
</tr>
</table>
</form></td>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#000000">
<tr>
<td align="center" height="30"class=td1>
<%=footer%>
</td>
</tr>
</table>


</body>
</html>
...全文
154 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
SK猫 2009-07-11
  • 打赏
  • 举报
回复
代码还不能高亮,再贴一次,34行


<%
exec="select * from user where name='"&session("user_name")&"'"
Set RS = Server.CreateObject("ADODB.RecordSet")
rs.Open exec, Conn, 1, 2

If Not rs.eof then

name=rs("name")
pass=rs("pass")
zsxm=rs("zsxm")
xb=rs("xb")
dianhua=rs("dianhua")
suoji=rs("suoji")
youbian=rs("youbian")
dizi=rs("dizi")
ll=rs("ll")

%>
<form method="POST" action="addnews.asp" name="form1" onsubmit="return FrontPage_Form1_Validator(this)">
<br>
<table border="0" width="98%" cellspacing="1" cellpadding="3" bordercolorlight="#FFE8E8" bordercolordark="#FFFFFF" align="center" bgcolor="#205E7B">
<tr>
<td height="25"> <b> <font color="#FFFFFF">  陈述病情 </font> </b>
</td>
<td style="color:#ffffff" colspan=2> <MARQUEE onMouseOver="if (document.all!=null){this.stop()}"
onmouseout="if (document.all!=null){this.start()}" scrollAmount=4
scrollDelay=150> <%

End If
rs.close


sql="select top 3 * from smallpager where s_conten='病案提交' order by id desc"
Set rs= Server.CreateObject("ADODB.RecordSet")
rs.Open sql, Conn, 1, 2
SK猫 2009-07-11
  • 打赏
  • 举报
回复
<!--#include file="top.asp"-->
<%

if session("user_name")="" and session("user_pass")="" then

response.write" <SCRIPT language=JavaScript>alert('没有注册或登陆!');"
response.write"location.href='showuser.asp' </SCRIPT>"
response.end
end if
%>

<%session("new")="new"%>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center"style="BORDER-LEFT: #000000 1px solid; BORDER-RIGHT: #000000 1px solid" bgcolor="#64B3D9" >
<tr>
<td> <SCRIPT language=JavaScript>
function FrontPage_Form1_Validator(theForm)
{
if (theForm.name.value == "")
{
alert("能告诉我你是谁吗?");
theForm.name.focus();
return (false);
}
if (theForm.title.value == "")
{
alert("病症概述不能为空!");
theForm.title.focus();
return (false);
}

return (true);
}
</script>
<%
exec="select * from user where name='"&session("user_name")&"'"
Set RS = Server.CreateObject("ADODB.RecordSet")
rs.Open exec, Conn, 1, 2

If Not rs.eof then

name=rs("name")
pass=rs("pass")
zsxm=rs("zsxm")
xb=rs("xb")
dianhua=rs("dianhua")
suoji=rs("suoji")
youbian=rs("youbian")
dizi=rs("dizi")
ll=rs("ll")

%>
<form method="POST" action="addnews.asp" name="form1" onsubmit="return FrontPage_Form1_Validator(this)">
<br>
<table border="0" width="98%" cellspacing="1" cellpadding="3" bordercolorlight="#FFE8E8" bordercolordark="#FFFFFF" align="center" bgcolor="#205E7B">
<tr>
<td height="25"> <b> <font color="#FFFFFF">  陈述病情 </font> </b>
</td>
<td style="color:#ffffff" colspan=2> <MARQUEE onMouseOver="if (document.all!=null){this.stop()}"
onmouseout="if (document.all!=null){this.start()}" scrollAmount=4
scrollDelay=150> <%

End If
rs.close


sql="select top 3 * from smallpager where s_conten='病案提交' order by id desc"
Set rs= Server.CreateObject("ADODB.RecordSet")
rs.Open sql, Conn, 1, 2
if rs.eof then
response.write"暂时没有公告"
else
do while not rs.eof
name=" "&rs("user_name")&"说:"
title=rs("s_title")&"    "
response.write title
rs.movenext
loop
rs.close
set rs=nothing
end if %> </MARQUEE> </td>
</tr>
<tr>
<td width="16%" align="center" bgcolor="#92C8E2">病症概述: </td>
<td colspan="2" bgcolor="#92C8E2">
<input type="hidden" name="name" size="20" maxlength="15" value=" <%=session("user_name")%>">
<input type="hidden" name="pass" size="20" maxlength="15" value=" <%=pass%>">
<input type="hidden" name="xb" size="20" maxlength="15" value=" <%=xb%>">
<input type="hidden" name="dianhua" size="20" maxlength="15" value=" <%=dianhua%>">
<input type="hidden" name="suoji" size="20" maxlength="15" value=" <%=suoji%>">
<input type="hidden" name="ll" size="20" maxlength="15" value=" <%=ll%>">
<input type="hidden" name="youbian" size="20" maxlength="15" value=" <%=youbian%>">
<input type="hidden" name="dizi" size="20" maxlength="15" value=" <%=dizi%>">

<input type="text" name="title" size="50" maxlength="40" >
(标题限制 <b>20 </b> 个汉字以内) <font color="#FF0000">* </font> </td>
</tr>
<tr>
<td width="16%" align="center" bgcolor="#DAEDF5">选择表情: </td>
<td colspan="2" bgcolor="#DAEDF5">
<% for i=0 to 17 %>
<input type="radio" value=" <%=(i)%>" name="pic" <%if i=0 then response.write "checked"%>>
<img src=" <%="title/face" &(i) & ".gif"%>" >  
<%if i>0 and ((i+1) mod 9=0) then response.write " <br>"%>
<%next%>
</td>
</tr>
<tr>
<td width="16%" align="center" bgcolor="#92C8E2">
<select name="face" size=1 onChange="document.images['idface'].src=options[selectedIndex].value;" >
<option selected value="images/01.gif">用户头像-01
<option selected value="images/02.gif">用户头像-02
<option selected value="images/03.gif">用户头像-03
<option selected value="images/04.gif">用户头像-04
<option selected value="images/05.gif">用户头像-05
<option selected value="images/06.gif">用户头像-06
<option selected value="images/07.gif">用户头像-07
<option selected value="images/08.gif">用户头像-08
<option selected value="images/09.gif">用户头像-09
<option selected value="images/10.gif">用户头像-10
<option selected value="images/11.gif">用户头像-11
<option selected value="images/12.gif">用户头像-12
<option selected value="images/13.gif">用户头像-13
<option selected value="images/14.gif">用户头像-14
<option selected value="images/15.gif">用户头像-15
<option selected value="images/16.gif">用户头像-16
<option selected value="images/17.gif">用户头像-17
<option selected value="images/18.gif">用户头像-18
<option selected value="images/19.gif">用户头像-19
<option selected value="images/20.gif">用户头像-20
</select>
<img id=idface src="images/01.gif" alt=个人形象代表> </td>
<td valign="top" colspan="2" bgcolor="#92C8E2">
<table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
详细病况、病史及以往治疗情况 <br>
<textarea name="nei" style="display:none"> <br> <br> <br>病案提交目的: </textarea>
<iframe ID="bbs" src="edit/ewebeditor.asp?id=nei&style=bbs" frameborder="0" scrolling="no" width="100%" HEIGHT="350"> </iframe>


</td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3" >
<p align="center">
<input type="submit" value=" 提交 " name="B1" >
   
<input type="reset" value=" 清除 " name="B2" >
</td>
</tr>
</table>
</form> </td>
</tr>
</table>
<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#000000">
<tr>
<td align="center" height="30"class=td1>
<%=footer%>
</td>
</tr>
</table>


</body>
</html>




写代码细心点啊,只帮你大致看了下,其它的问题自己看吧

28,406

社区成员

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

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