Greetings Guru's
I have a peculiar problem with TableAdapters and the Fill Method. I have a bunch of autogenerated TableAdapters as a result of binding an app to a DataSource. They are bound to controls on my form and work as expected.
Now I need to call the fill method on the TableAdapters from time to time and I want to do It programatically (TableAdapters["Name"].Fill(myDataSet["Name_Table"]);) instead of literally (TableAdapter_Name.Fill(myDataSet.Name_Table);
The Idea is to pass a string to a method that can call the targeted TableAdapter by parsing the string to recognize the desired object. I've often wished that C# supported creating dynamic statements/methods (from strings) that can be executed like a regular statement.
Is this possible? (If not it seems like I'll be doing a LOT of literal typing to represent all of my TableAdapters and when I do a lot of literal typing of strings in my code it's a RED FLAG that I'm doing something wrong"
Help, Zion
NameTableAdapter.Fill(myDataSet.Name); StateTableAdapter.Fill(myDataSet.State); CityTableAdapter.Fill(myDataSet.City);