dim kind
i = 1
do while not rs.eof
kind(i) = rs("kind")'报这行有错
i = i+1
'response.write rs("kind")
rs.movenext
loop
Microsoft VBScript 运行时错误 (0x800A000D)
/new/news.asp, 第 17 行
...全文
8610打赏收藏
如何赋值给数组
dim kind i = 1 do while not rs.eof kind(i) = rs("kind")'报这行有错 i = i+1 'response.write rs("kind") rs.movenext loop Microsoft VBScript 运行时错误 (0x800A000D) /new/news.asp, 第 17 行
dim kind()
i = 1
do while not rs.eof
if not isnull(rs("kind") then '判断rs("kind")是否可用来赋值
kind(i) = rs("kind")'报这行有错
i = i+1
end if
'response.write rs("kind")
rs.movenext
loop
dim kind()
dim i
i = 0
if rs.recordcount > 0 then
redim kind(rs.recorcount)
rs.movefirst
do while not rs.eof
kind(i) = rs("kind").value
i = i + 1
rs.movenext
loop
end if