请问这是什么问题??帮帮我~~~在线等~

hexuedong 2004-09-25 11:19:02
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="41%" height="38" >头像:
<select name="face" class="login" size=1 onChange="document.images['face'].src=options[selectedIndex].value;">

<%
dim i

set rst=server.createobject("ADODB.Recordset")
strSQL="select image from face"
rst.open strSQL,conn,3,1
if not(rst.bof and rst.eof) then
do while not rst.eof


%>

<option value="<%=rst("image")%>"><%=rst("image")%></option>
<%


rst.movenext
loop
end if
%>
</select>
</td>
<td width="59%" rowspan="2" align="center">
<img id="face" src="<%=rst("image")%>" ></td>
</tr>
<tr>
<td height="27" scope="row" ></td>
</tr>
</table>
错误类型:
ADODB.Field (0x80020009)
/changeface.asp
错误:BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
...全文
228 24 打赏 收藏 转发到动态 举报
写回复
用AI写文章
24 条回复
切换为时间正序
请发表友善的回复…
发表回复
香椿炒鸡蛋 2004-09-25
  • 打赏
  • 举报
回复
你循环过后还要显示rst("image")啊 ,那你在循环后面就要 rst.movefirst了 重新将指针置前才能有值的 顺便问一句 你image里面放的是什么东西呀
tpf9000 2004-09-25
  • 打赏
  • 举报
回复

tkchen 2004-09-25
  • 打赏
  • 举报
回复
<img id="face" src="<%=rst("image")%>" >
是不是这里不用<%=rst("image")%>,而直接改一个固定的SRC就好拉
hexuedong 2004-09-25
  • 打赏
  • 举报
回复
好了,好了!!~~~

原来是机器的毛病。555~~~

谢谢大家~~~

现在就结帖!
香椿炒鸡蛋 2004-09-25
  • 打赏
  • 举报
回复
现在报什么错? 打开记录集以后 先用response.write rst("image") 看看有没有值?
不行得话建议你将image字段改成image1再试试
hexuedong 2004-09-25
  • 打赏
  • 举报
回复
5555~~~~~~~~
还是不行呀1!!

弄好了一定结分!!!
tpf9000 2004-09-25
  • 打赏
  • 举报
回复
有道理
Leey001 2004-09-25
  • 打赏
  • 举报
回复
在end if后加一句
rst.movefirst
香椿炒鸡蛋 2004-09-25
  • 打赏
  • 举报
回复
呵呵 在线不 试试看那 对了要给分哦 呵呵
lansheyuyan 2004-09-25
  • 打赏
  • 举报
回复
<table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="41%" height="38" >头像:
<select name="face" class="login" size=1 onChange="document.images['face'].src=options[selectedIndex].value;">

<%
dim i

set rst=server.createobject("ADODB.Recordset")
strSQL="select * from face"
rst.open strSQL,conn,1,3
if rst.bof and rst.eof then
response.wirte"没有记录"
else
do while not rst.eof
%>

<option value="<%=rst("image")%>"><%=rst("image")%></option>
<%
rst.movenext
loop
%>
</select>
</td>
<td width="59%" rowspan="2" align="center">
<img id="face" src="<%=rst("image")%>" ></td>
</tr>
<tr>
<td height="27" scope="row" ></td>
</tr>
<%
rs.close
set rs=nothing
end if
%>
</table>
香椿炒鸡蛋 2004-09-25
  • 打赏
  • 举报
回复
换成 strSQL,conn,1,3 或strSQL,conn,1,1试试看

把strSQL="select image from face"换成 strSQL="select [image] from [face]" 看看 弄不好是关键字

hexuedong 2004-09-25
  • 打赏
  • 举报
回复
是不是分数太少?不肯帮忙?

能帮我解答者,高分相送!!
hexuedong 2004-09-25
  • 打赏
  • 举报
回复
response.write rst.recordcount也显示不出来记录的,可是在数据表里明明有记录的呀

image字段也有数据的

为什么会这样呢?~~~

各位高手救救我!~~~
tpf9000 2004-09-25
  • 打赏
  • 举报
回复
response.write rst.recordcount
可以显示出记录数吗》?
aaajd 2004-09-25
  • 打赏
  • 举报
回复
rst.open strSQL,conn,1,3
改成rst.open strSQL,conn

lansheyuyan 2004-09-25
  • 打赏
  • 举报
回复
看看数据库里image有没有空的!
hexuedong 2004-09-25
  • 打赏
  • 举报
回复
lansheyuyan(一颗心,一根肠子):还是一样显示BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

我不知道怎么办了,搞了一上午了~~~
hexuedong 2004-09-25
  • 打赏
  • 举报
回复
to:tpf9000(流光鸟) 还是显示不出来,你的方法我试过了!


cao5(草屋主人) :我的不是NTFS的

大家帮帮忙呀,这问题很奇怪,以前不会这样的呀

lansheyuyan 2004-09-25
  • 打赏
  • 举报
回复
<%
dim i

set rst=server.createobject("ADODB.Recordset")
strSQL="select * from face"
rst.open strSQL,conn,1,3
if rst.bof and rst.eof then
response.wirte"没有记录"
else
do while not rst.eof
%>
<option value="<%=rst("image")%>"><%=rst("image")%></option>
<%
rst.movenext
loop
end if
%>
tpf9000 2004-09-25
  • 打赏
  • 举报
回复
if not(rst.bof and rst.eof) then
换成
if rst.recordcount>0 then
加载更多回复(4)

28,404

社区成员

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

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