Refer to Dataset using variable

S

shisncreen

Is there any way to refer to a dataset using a variable. This is what
I would like to do . . .


FunctionPopulateDropDownList(DataSetName as string)
. . .
myDataAdapter.Fill(DataSetName, Inventory_Table)
. . .

I would like to use a variable name so that I can call this function
for multiple areas of my web page that do different dropdownlists.
But I have not figured out how.

Thanks in advance!
 
K

Karl

You could store your datasets in a hashtable to your class.

myDataAdapter.Fill(Ctype(myHashtable(DataSetName), DataSet),
Inventory_Table);

Karl
 

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

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top