拷寇剧本:“Provider (0x80020005) 类型不匹配”请求高手!!

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/09 14:02:24
我的是用asp做的一个笑话类网站,所做的记录要在list.asp中显示出来,其他的没问题,但是我加了一个新的分类,往里添加了一个flash,然后显示不出来,显示:
错误类型:
Provider (0x80020005)
类型不匹配。
/list.asp, 第 186 行

源代码如下:
<%set rs=server.createobject("adodb.recordset")
if Founderr=true then
sql="select articleid,title,syxs,sort from learning where syxs>0 "
else
sql="select articleid,title,syxs,sort from learning where syxs>0 and sort='"&sort&"' "
end if
rs.open sql,conn,1,1
IF Not rs.Eof Then
'//定义n为总记录数,m为要随机提取记录数,m如为随机数则可随机提取m条记录
'//注意:m<=n
dim n,m
n=rs.recordcount
m=5
'//建立随机数组
Randomize
dim k,p,tp,i
For k=0 to 100000
p=fix(rnd*n)+1
if Not instr(tp,p)>0 then
tp=tp & p & ","
i=i+1
end if
if i>=m then exit for
Next
dim t
t=split(tp,",")
For i=0 To m-1 and not rs.eof
'//根据随机数组定位记录指针
rs.absoluteposition=t(i)
if rs("syxs")>1 then

response.write "·<A HREF=list.asp?picid="&rs("articleid")&"><font color=#FF0000>"&rs("title")&"</font></A></br>"

else
response.Write "·<A HREF=list.asp?id="&rs("articleid")&" >" &rs("title")&"</A></br>"
end if
if rs.eof then exit for
next
end if

rs.close
set rs=nothing
conn.close
set conn = nothing
%>

然后我又把这个flash添加到另外的记录内则可以正常显示,不知道为什么?
但是我把rs.absoluteposition=t(i)这句代码给去掉后,都可以显示了,但是新的问题又出来了,随机显示的功能又不能用了,显示的一直是一条记录!
请高手帮忙,由于这是在网上下载的程序代码,所以不是太懂,还忘高手帮忙解释的清楚点,谢谢!
我的QQ:278176736,一直在线,可加我QQ,谢谢!

Strtoint(t(i)),试试!

待我试试,我的QQ名叫蜡笔小新