hblackorby
Programmer
Hi,
I pull a number of values out of a database and put them into a Dictionary object using .Exists() method to make sure that I only have a set up unique values. What I need to do is then write out all the keys. When I get the key array, it seems to work fine until I attempt to write something out. Then it acts like it's not an array any more.
(volts is my dictionary)
Response.Write "<br>" & volts.Count & "<br>"
keyarray = volts.Keys()
if isarray(keyarray) then
Response.Write lbound(keyarray) & "-" & ubound(keyarray) & "<br>"
for j = lbound(keyarray) to ubound(keyarray)
Response.Write j & ": "
Response.Write keyarray(j) & "<BR>"
next
else
Response.Write "Keyarray is not an array.<Br>"
end if
volts.RemoveAll
set volts = nothing
Output:
6
0-5
0: error '80020009'
Exception occurred.
/emcatalog/cr/motorguide2.asp, line 62
Where line 62 is where I try to write out keyarray(j).
"exception occured" is not useful at all.
Any help is greatly appreciated. Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
I pull a number of values out of a database and put them into a Dictionary object using .Exists() method to make sure that I only have a set up unique values. What I need to do is then write out all the keys. When I get the key array, it seems to work fine until I attempt to write something out. Then it acts like it's not an array any more.
(volts is my dictionary)
Response.Write "<br>" & volts.Count & "<br>"
keyarray = volts.Keys()
if isarray(keyarray) then
Response.Write lbound(keyarray) & "-" & ubound(keyarray) & "<br>"
for j = lbound(keyarray) to ubound(keyarray)
Response.Write j & ": "
Response.Write keyarray(j) & "<BR>"
next
else
Response.Write "Keyarray is not an array.<Br>"
end if
volts.RemoveAll
set volts = nothing
Output:
6
0-5
0: error '80020009'
Exception occurred.
/emcatalog/cr/motorguide2.asp, line 62
Where line 62 is where I try to write out keyarray(j).
"exception occured" is not useful at all.
Any help is greatly appreciated. Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO