1
Answer

Change Connection String in app.config with code

mike Delvotti

mike Delvotti

11y
1.3k
1
Guys,

This is a long shot, but can you change the connection string in the app.config on a windows form app with code?

I want to launch my app and give a choice of which database it loads, i.e. my application can load data from 2 different databases but i need to swap the connection string via a user control (like a button click) to do this.

Is it possible?
Answers (1)