Hi all,
I'm having a little trouble with some code Im writing and Im thinking
there has to be an easy fix. What Ive done is fill a dataset via 3
odbcdataadapters. The dataset is also the datasourse for a datagrid.
When I run the program, the datagrid is nothing more than an empty box
with a graybox in the top left corner. If I explode the graybox, I
have the choice of choosing the odbcdataadapter, and once I select an
adapter and click it, the grid fills with all the correct info. This
all works the way it is meant to.
Heres the problem. I've created a combobox that automatically fills
with all the available odbcdataadapters. The idea is to let the end
user choose here instead of having to explode the graybox.
If I code DataGrid3.DataSource = DataSet11.SO_03SOHistoryHeader
For example, it works like a champ and fills the grid.
However, I need something like:
Dim mySelection as string = combobox1.selectedtext.tostring
'(say user selected "SO_03SOHistoryHeader" - same as above)
DataGrid3.DataSource = DataSet11.mySelection
"ERROR - mySelection is not a member of DataSet11"
This obviously does not work. I cant figure out how to implement a
variable into the statement.
Ive also tried:
With DataSet3
.DataSource = DataSet11
.DataMember = mySelection
End with
This also does not work, however is runs without reporting an error
Any help will be greatly appreciated.
Thanks,
Josh