I have a classic ASP site where I create a dictionary when the user logs in and then stores that dictionary in a session variable like so…
dim objDict
set objDict = server.createobject("scripting.dictionary")
' processing here to fill dictionary
set session("user") = objDict
That all works fine and dandy but when I navigate to another page and try to access a value from the stored dictionary like this…
session("user").item("id")
I get the following error…
error '80020009'
Can anyone tell me if I’m accessing the stored dictionary incorrectly? Is storing the dictionary object in a session variable a bad/wrong thing to do?
Thanks
Have you tried in your code doing something like the following when you want to access it?
Try that and see if it works. I wouldn’t think this would be necessary but Classic ASP wasn’t exactly the most robust language. What you want to do should be workable, since the Session object simply stores objects.