在现等待解答,关于ASP多次连接数据库的问题,请进来听我详细说明一下
lcfjs 2011-06-21 03:50:00 是这样的,在ASP中,我想要两次访问数据库,我是用的AJAX在另一个页面访问的,
第一次访问时可以的,
sql_aid = "select AID, archivesid from alldocument where archivesid between '" & v_begin & "' and '" & v_end & "'"
rs.open sql_aid, conn
while not rs.eof
redim preserve arr_aid(v_count)
arr_aid(v_count)=rs("AID") & "," & rs("archivesid")
v_count=v_count+1
rs.movenext
wend
Response.Write(arr_aid(0))
但是我接着访问第二次就不行了
sql_aid = "sql1"
rs.open sql_aid, conn
while not rs.eof
redim preserve arr_aid(v_count)
arr_aid(v_count)=rs("AID") & "," & rs("archivesid")
v_count=v_count+1
rs.movenext
wend
sql_img=“sql2”
v_count=0
rs.open sql_img, conn
while not rs.eof
if rs("pagecount")=0 then
v_msg=rs("rawfilename") & rs("pagecount")
end if
redim preserve arr_img(v_count)
arr_img(v_count)=rs("rawfilename") & "," & rs("pagecount")
v_count=v_count+1
rs.movenext
wend
Response.Write(arr_aid(0))
各位大神帮我解决一下,拜谢~~~~~~~~~~