关于“类型不匹配: 'rs'”的错误!!!

fujunle 2006-11-05 04:05:25
=====================================================
<%
Set rs=Server.CreateObject("Adodb.RecordSet")
sql="select * from lpbj where user_id=270 order by date desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "暂无内容"
end if
%>
<TABLE width="98%" height="25" border=0 cellPadding=0 style="border-collapse: collapse; margin-top:5">
<tr>
<td height="25" align="center" bgcolor="#800000">
<font color="#FFFFFF">楼盘名称</font></td>
<td height="25" align="center" bgcolor="#800000">
<font color="#FFFFFF">楼盘类型</font></td>
<td height="25" align="center" bgcolor="#800000">
<font color="#FFFFFF">售楼热线</font></td>
<td height="25" align="center" bgcolor="#800000">
<font color="#FFFFFF">元/米<sup>2</sup>(起价)</font></td>
<td height="25" align="center" bgcolor="#800000">
<font color="#FFFFFF">发布日期</font></td>
</tr>
(30行错误) <%do while not rs.eof%>
<tr>
<td height="25" align="left">
 <%=rs("lpname")%></td>
<td height="25" align="left">
 <%=rs("lplx")%></td>
<td height="25" align="left">
 <%=rs("tel")%></td>
<td height="25" align="left">
 <%=rs("jiage")%></td>
<td height="25" align="left">
 <%=rs("date")%></td>
</tr>
<%
rs.movenext
rs.close
set rs=nothing
loop
%>
</table>
=====================================================
类型不匹配: 'rs',错误30行
...全文
291 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
vvvice 2006-11-06
  • 打赏
  • 举报
回复
晚来了。
gui0605 2006-11-06
  • 打赏
  • 举报
回复
这错..
yowbell 2006-11-06
  • 打赏
  • 举报
回复
开眼界,学习!
q2000000 2006-11-06
  • 打赏
  • 举报
回复
哈,前天我也是这样的问题,后来看了半天不知道错在哪。最后一个CLOSS就搞定了,,,,,,
UP一下
chinastorm 2006-11-06
  • 打赏
  • 举报
回复
loop的原因
大家都很快么,楼主结贴了!
飘零雾雨 2006-11-06
  • 打赏
  • 举报
回复
rs.movenext
loop
rs.close
set rs=nothing
chinabh 2006-11-06
  • 打赏
  • 举报
回复
来晚了,呵呵
ljmljz 2006-11-05
  • 打赏
  • 举报
回复
dxef正解
stou 2006-11-05
  • 打赏
  • 举报
回复
樓上正解.
我是丁学 2006-11-05
  • 打赏
  • 举报
回复
rs.movenext
rs.close
set rs=nothing
loop
=============================
这几行错了,把loop写到rs.close上面
你这样写,在第一次循环就把rs=nothing了,第二次循环当然会出错
要这样:
rs.movenext
loop
rs.close
set rs=nothing

28,391

社区成员

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

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