Global Application Settings Override (Now with examples!)

Posted on July 29, 2010 
Filed Under .Net Code, CSharp, VB.Net, Windows Deployment

My previous posting about TableAdapter connection strings was a pretty big hit with a lot of people. It’s still being referenced on the MSDN forums from time to time when someone needs a solution to the problem of having a connection string for a TableAdapter in the app.config that they need to override at runtime.

Since that post was in VB.Net and over 2 years old now, I’ve decided to resurrect it and work up a quick sample project with both C# and VB.Net code. Someone had request C# and I have no idea why I didn’t include it when I did that post, but better late than never!

Click here for the sample solution. (VS2010) If you don’t have that version of visual studio, you can download the express version from Microsoft, or just open the projects individually in VS2008.

Comments

4 Responses to “Global Application Settings Override (Now with examples!)”

  1. TableAdapter Connection Strings : TheCodeMonk on July 29th, 2010 11:13 pm

    […] 7/29/2010 Update – I have uploaded a sample project here for those of you still struggling with this. It includes C# and VB.Net projects. […]

  2. Riaan Wiese on August 2nd, 2010 8:55 am

    I clicked on “here” to get the sample code but I simple end up on the same article from where I started. How can I get hold of the sample code?

    Kind regards.
    Riaan Wiese

  3. TheCodeMonk on August 2nd, 2010 9:35 am

    Sorry about that! The link has been fixed.

  4. Darwin on November 12th, 2011 10:39 pm

    I want to try the sample project in order for me to know more about the concepts of changing the connection string at run time.

Leave a Reply