J
John Wilson
Hello friends,
I have this dynamic array(shown below) that I need to match to values
(1 - 10) that I am returning from the database via DSN connection
object. The values I need to match are on the same page (in their own
table) but I am not sure how to match up the array indexes to these
values. I want to be able to display the array result as part of or
nested in another table.
Thanks in advance,
John Wilson
Programmer/Analyst
<td valign="top">
<h3>Dynamic Array</h3>
<%
' Now on to our dynamic array. Before I can use a dynamic array
' I need to tell it how many elements I want to be able to put
' into it. The ReDim command allows us to redimension an array
' to whatever size we need. I'm setting it to 2 elements so I
' use an upper bound of 1.
ReDim arrResponses(9)
arrResponses(0) = "Q1"
arrResponses(1) = "Q2"
arrResponses(2) = "Q3"
arrResponses(3) = "Q4"
arrResponses(4) = "Q5"
arrResponses(5) = "Q6"
arrResponses(6) = "Q7"
arrResponses(7) = "Q8"
arrResponses(8) = "Q9"
arrResponses(9) = "Q10"
' Show what our array currently contains:
ShowArrayInTable(arrResponses)
ReDim Preserve arrResponses(15)
' Adding another value:
arrResponses(10) = "Q11"
arrResponses(11) = "Q12"
arrResponses(12) = "Q13"
arrResponses(13) = "Q14"
arrResponses(14) = "Q15"
arrResponses(15) = "Q16"
' Once again show what our array currently contains:
ShowArrayInTable(arrResponses)
%>
</td>
I have this dynamic array(shown below) that I need to match to values
(1 - 10) that I am returning from the database via DSN connection
object. The values I need to match are on the same page (in their own
table) but I am not sure how to match up the array indexes to these
values. I want to be able to display the array result as part of or
nested in another table.
Thanks in advance,
John Wilson
Programmer/Analyst
<td valign="top">
<h3>Dynamic Array</h3>
<%
' Now on to our dynamic array. Before I can use a dynamic array
' I need to tell it how many elements I want to be able to put
' into it. The ReDim command allows us to redimension an array
' to whatever size we need. I'm setting it to 2 elements so I
' use an upper bound of 1.
ReDim arrResponses(9)
arrResponses(0) = "Q1"
arrResponses(1) = "Q2"
arrResponses(2) = "Q3"
arrResponses(3) = "Q4"
arrResponses(4) = "Q5"
arrResponses(5) = "Q6"
arrResponses(6) = "Q7"
arrResponses(7) = "Q8"
arrResponses(8) = "Q9"
arrResponses(9) = "Q10"
' Show what our array currently contains:
ShowArrayInTable(arrResponses)
ReDim Preserve arrResponses(15)
' Adding another value:
arrResponses(10) = "Q11"
arrResponses(11) = "Q12"
arrResponses(12) = "Q13"
arrResponses(13) = "Q14"
arrResponses(14) = "Q15"
arrResponses(15) = "Q16"
' Once again show what our array currently contains:
ShowArrayInTable(arrResponses)
%>
</td>