laziness and dictionaries

J

JT

im using a data dictionary to store a bunch of name/value pairs - im
wondering if there is a way i can refer to the items in my dictionary
without always having to type, for example:

objDictionary.Item("account_no")

can't i somehow extract all the values so that i can simply type account_no?

i know i can name my dictionary something easy like 'd', but im still
feeling lazy.

tia
jt
 
W

WIlliam Morris

Sure, but you'll have to do it at the top of every asp page where you want
to use the values.

For each thing in objDictionary
Execute "dim " & thing & " = """ & objDictionary.Item(thing) & """"
Next

(you'll need to check the exact syntax on looping the dictionary...I've got
it in my code somewhere but I'm feeling lazy and I don't want to go look it
up :)
 
B

Bullschmidt

It seems like something like this might work:

With objDictionary
MyVar = .Item("account_no")
End With

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top