Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assigning an object to a variable

Status
Not open for further replies.

warrendlr

IS-IT--Management
May 28, 2002
7
0
0
GB
Hi. I would like to do the following:

I enumerate all my datasets in a collection (say in a hashtable htHashTable).

Now, I would like to use something like
dsMyDataSet = session("dsMyDataSet")
where the session variable has been set previously, but where I could use a "for each" instruction to loop among the items of my collection. I would be something like

Dim dsTemp as DataSet
For Each sTemp as String In htHashTable.Keys
dsTemp = htHashTable.Item(sTemp)
dsTemp = session(dstemp.DataSetName)
next

Of course, this does not work, as the variable dsTemp is never used as a pointer to the real dataset dsMyDataSet, and thus the assignment of the session object is not done to the dsMyDataSet object.

Does anyone have an idea on how to proceed ?
 
to be honest, this is only a guess...and quite possibly a poor one at that. but try this

dim dtemp as object

for each dtemp in whatever
do stuff
next


i don't know if it will work, but try it anyway.

hayt

ps - hopefully someone with more knowledge then me can give you a better answer if that doesn't work. i am thinking it should, you just will not get the intellisense stuff. maybe. i dunno.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top