A dynamic two dimension all array not quite working out.....
dim arrNewChoice
While Not RS.EOF
Select Case iChoice
Case 1
Response.Write(strChoice)
Case 2
Response.Write(strChoice)
Case 3
Response.Write(strChoice)
Case Else
Redim arrNewChoice(1,d)
arrNewChoice(0,d) = RS("choicePath")
arrNewChoice(1,d) = RS("choiceName")
Redim Preserve arrNewChoice(1,d)
d = clng(d)+1
End Select
RS.MoveNext
Wend
'writing out
Dim a
For a = 0 to UBound(arrNewChoice,2)
Response.Write(arrNewChoice(0,a) & arrNewChoice(1,a))
Next
If there were two 'case else' choices these appear as:
elsechoice 1 = --blank--
elsechoice 2 = new choice two
if three
elsechoice 1 = --blank--
elsechoice 2 = --blank--
elsechoice 3 = new choice three
So only the last array variable is being preserved. Where am I going wrong?
TIA
"Away from the actual ... everything is virtual"
dim arrNewChoice
While Not RS.EOF
Select Case iChoice
Case 1
Response.Write(strChoice)
Case 2
Response.Write(strChoice)
Case 3
Response.Write(strChoice)
Case Else
Redim arrNewChoice(1,d)
arrNewChoice(0,d) = RS("choicePath")
arrNewChoice(1,d) = RS("choiceName")
Redim Preserve arrNewChoice(1,d)
d = clng(d)+1
End Select
RS.MoveNext
Wend
'writing out
Dim a
For a = 0 to UBound(arrNewChoice,2)
Response.Write(arrNewChoice(0,a) & arrNewChoice(1,a))
Next
If there were two 'case else' choices these appear as:
elsechoice 1 = --blank--
elsechoice 2 = new choice two
if three
elsechoice 1 = --blank--
elsechoice 2 = --blank--
elsechoice 3 = new choice three
So only the last array variable is being preserved. Where am I going wrong?
TIA
"Away from the actual ... everything is virtual"