Refer to Dataset using variable

  • Thread starter Thread starter shisncreen
  • Start date Start date
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!
 
You could store your datasets in a hashtable to your class.

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

Karl
 
Back
Top