参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突

mysite365 2008-04-11 08:54:50
<link href="css/mycss.css" rel="stylesheet" type="text/css">
<table width="181" border="1" cellpadding="0" cellspacing="0" bordercolor="#3AB928">
<tr>
<td height="35" background="image/rangkings.gif"></td>
</tr>
<tr>
<td height="59">
<table width="90%" height="42" align="center" cellpadding="0" cellspacing="0">
<%
set rs2=server.createobject("adodb.recordset")
rs2.open "select * from bout_user order by sales_total desc",conn,1,3
if rs2.eof and rs2.bof then
%>
<tr>
<td width="80%">对不起,活动还没开始或还没有排名参赛人员!</td>
</tr>
<% else
for i=1 to 10
%>
<tr>
<td align="center"><img src="image/<%=i%>.gif" width="15" height="15" >   <%=rs2("turename")%></td>
</tr>
<%
rs2.movenext
if rs2.eof then
exit for
end if
next
end if
rs2.close
rs2.nothing
%>
</table>
</td>
</tr>
</table>
<br />

代码出错在这就话:
set rs2=server.createobject("adodb.recordset")
错误类型:
ADODB.Recordset (0x800A0BB9)
参数类型不正确,或不在可以接受的范围之内,或与其他参数冲突。
/tea/paihang.asp, 第 11 行

还有一个问题:
<td align="center"><img src="image/<%=i%>.gif" width="15" height="15" >   <%=rs2("turename")%></td>
这就话有问题吗?主要功能实现图片的循环输出。。。
...全文
77 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
rbwang 2008-04-11
  • 打赏
  • 举报
回复
[Quote=引用 5 楼 liangjianshi 的回复:]
缺少数据库连接代码
[/Quote]
mysite365 2008-04-11
  • 打赏
  • 举报
回复
奥,在看看
  • 打赏
  • 举报
回复
rs2.open "select * from bout_user order by sales_total desc",conn,1,3
你这个打开数据库了吗?没打开你使用这个当然出错
anndy1999 2008-04-11
  • 打赏
  • 举报
回复
conn 哪儿来的?应该是忘了加上吧?!
mysite365 2008-04-11
  • 打赏
  • 举报
回复
修改为set rs2=nothing
错误显示还一样。。。。。
itzhiren 2008-04-11
  • 打赏
  • 举报
回复
rs2.nothing
========>
set rs2 = nothing
liangjianshi 2008-04-11
  • 打赏
  • 举报
回复
缺少数据库连接代码

28,391

社区成员

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

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