28,390
社区成员
发帖
与我相关
我的任务
分享
Dim myarray()
Redim myarray(1,2)
j=1
do while not rs.eof
myarray(j,0)=Csng(rs("total"))
myarray(j,1)=rs("tt")
j=j+1
ReDim Preserve myarray(j,2)
rs.movenext
loop
rs.close
set rs=nothing
call CloseConn()
end if
'错误的:
redim aTest(A,B)
redim preserve aTest(A+1,B)
'正确的:
redim aTest(A,B)
redim preserve aTest(A,B+1)
<%
rs.open sql,conn,1,1
if not rs.eof then
Dim myarray()
Redim myarray(rs.recordcount-1,1)
for i=0 to rs.recordcount-1
total=rs("total")&""
if len(total)=0 then total=0
myarray(i,0)=total
myarray(i,1)=rs("tt")&""
rs.movenext
next
rs.close: set rs=nothing
call CloseConn()
else
'...............................
response.end
end if
%>