数组问题
dim p_txt(4),p_img(4),p_url(4)set rs=Server.CreateObject("adodb.recordset")
sql="Select top 5 from [gg] order by zp_id desc"
rs.Open sql,conn,2,3
if not rs.eof then
Response.Write("<script>alert('系统出错!')</script>")
Response.End()
End if
y=0
do while not rs.eof
p_txt(y)=rs("p_txt")
p_img(y)=rs("p_img")
p_url(y)=rs("p_url")
Response.Write(p_txt(y))
Response.Write(p_img(y))
Response.Write(p_url(y))
rs.MoveNext
y=y+1
loop
set rs=nothing
Response.Write(p_txt(0))
Response.Write(p_txt(1))
Response.Write(p_txt(2))
Response.Write(p_txt(3))
Response.Write(p_txt(4))
Response.Write(p_img(0))
Response.Write(p_img(1))
Response.Write(p_img(2))
Response.Write(p_img(3))
Response.Write(p_img(4))
Response.Write(p_url(0))
Response.Write(p_url(1))
Response.Write(p_url(2))
Response.Write(p_url(3))
Response.Write(p_url(4))
Response.End
这句话为什么一直执行
if not rs.eof
...
end if
把NOT 去掉还是执行
Response.Write("<script>alert('系统错误!')</script>")
这句话.
这里到底哪里错了