Help Please! I don't know what I have done!!! I have a datagriveview data bound .Net 4 C# windows forms app. At some point I changed the Connection string to one in code as I didn't want it seen in a config file. now when I try to pick up a new column from the database and add it to the grid View I get and error saying it can't find the connectionString.
I have re added it to the Properties settings but still get the same error!
How do I trace back from the datagridveiw to find where its picking it up from so I can add a column manually.
It uses a dataset.xsd which where 开发者_JAVA技巧I see the error re connection string.
So in summary I have a datagridview that I'm trying to update manually to pickup a new column in the database.
Go to your dataset and find the tableadapter that you are using to populate your data with. Click on the part of the adapter that says "SomethingTableAdapter" (in orange in the SS below). When you click the "connection property" does it allow you to select the connection string you have located in your Settings? If not select it.
I'll edit my answer to help you if that doesn't do the trick, but I'd assume that when you deleted the connection string the first time, the tableadapter itself lost the reference to it as well.
精彩评论