SQL = "SELECT * FROM T1News where ..."
SQL_Rs.open SQL,SQL_Cn,3
IF NOT(SQL_Rs.EOF) THEN
arrResultsx = SQL_Rs.getrows
ctrx = ubound(arrResultsx,2)
END IF
SQL_Rs.close
ctrx2=0
SQL = "SELECT * FROM T1News where ..."
SQL_Rs.open SQL,SQL_Cn,3
IF NOT(SQL_Rs.EOF) THEN
arrResultsx2 = SQL_Rs.getrows
ctrx2 = ubound(arrResultsx2,2)
END IF
SQL_Rs.close
ctrx = ctrx + 1
' ctr = ctrx+ctrx2
' ReDim arrResultsx(ctr)
' %><%=arrResultsx(x,ctr)%><Br><%
if ctrx2 > 0 then ' if anything in 2nd array, then proceed
for i = 0 to ctrx2
for x = 0 to 30
' redim preserve arrResultsx(x,ctrx)
arrResultsx(x,ctrx) = arrResultsx2(x,i) ' also tried arrResultsx(ctrx)=arrResultsx2(i)
ctrx = ctrx + 1
next
next
end if
Do more with
<%
ctrx=0
SQL = "SELECT * FROM yourfile"
SQL_Rs.open SQL,SQL_Cn,3
IF NOT(SQL_Rs.EOF) THEN
arrResultsx2 = SQL_Rs.getrows
ctrx2 = ubound(arrResultsx2,2)
END IF
SQL_Rs.close
ctrx2=0
SQL = "SELECT * FROM anotherfile"
SQL_Rs.open SQL,SQL_Cn,3
IF NOT(SQL_Rs.EOF) THEN
arrResultsx = SQL_Rs.getrows
ctrx = ubound(arrResultsx,2)
END IF
SQL_Rs.close
ctrN = cdbl(ctrx+ctrx2)
Dim arrResultsN()
ReDim arrResultsN(10,ctrN)
if ctrx > 0 then
for i = 0 to ctrx
for x = 0 to 10
arrResultsN(x,i) = arrResultsx(x,i)
next
next
end if
ctrx=ctrx+1
if ctrx2 > 0 then
for i = 0 to ctrx2
for x = 0 to 10
arrResultsN(x,ctrx) = arrResultsx2(x,i)
ctrx=ctrx+1
next
next
end if
ctrx = ctrx-1
%>
<table cellspacing="0" cellpadding="0" width="975" bgcolor="#ffffff" align="center" style="margin-top:-5;">
<tbody>
<tr>
<td valign="top" width="160" align=center><!-- #include virtual="rightlinks.asp" --></td>
<td valign="top" width="680" align=left><br>
<img border="0" src="images/NewsFeed.jpg" width="269" height="40"><hr>
<table align=left cellpadding=4 width=668><tr><td>
<%
if isarray(arrresultsx) then
for i = 0 to ctrx
sdate = arrResultsx(5,i)
etc.
Premium Content
You need an Expert Office subscription to comment.Start Free Trial