记录集问题
<!--#include file="conn.asp"--> <%
day1=1
music=request("music")
m_name=request("m_name")
spname=request("spname")
date1=request("date1")
region=request("region")
classname=request("classname")
date2=request("date2")
'if Trim(Request.QueryString("page"))="" Then
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select distinct BellID,SongName,SingerName,SpName,Region,YearMonth,DownloadsNumber from DownloadsData where"
if music <>"" then sql=sql&" SongName like '%"&music&"%' AND"
if m_name <>"" then sql=sql&" SingerName like '%"&m_name&"%' AND"
if spname <>"" then sql=sql&" SpName like '%"&spname&"%' AND"
if region <>"" then sql=sql&" Region like '%"®ion&"%' AND"
if date1 <>"" and date2="" then sql=sql&" YearMonth ='"&date1&"-"&day1&"' AND"
if date2 <>"" and date1="" then sql=sql&" YearMonth='"&date2&"-"&day1&"' AND"
if date1 <>"" and date2 <>"" then sql=sql&" YearMonth >= '"&date1&"-"&day1&"' AND YearMonth <= '"&date2&"-"&day1&"' AND"
DownloadsDate>'"&month1&"' AND"
if right(sql,5)="WHERE" then sql=left(sql,clng(len(sql))-5) '解决所有参数都为空的情况
if right(sql,3)="AND" then sql=left(sql,clng(len(sql))-3) '去掉参数最后的and
rs.Open sql,conn,1,1
session("sql")=sql
redim arr(rs.recordcount)
for i=0 to rs.recordcount-1
session("arr(i)")=rs("BellID")
rs.movenext
next
response.write arr(90)&" <br>"
'response.write sql
response.End()
%>
在这里,我给记录集的值给了数组.
为什么在另一个页面的时候,得不到数组的值呢?
有没有人知道怎么做.
给个思路或代码让我看看