I'm wondering what the best way to do this would be:
I am trying some stuff out and have a server with 2 databases on it, Live and Test. Basically I want to pick a connection on the first form that gets used throughout the program until it is closed. Everytime you run the program, you have to pick one.
I have two connection string settings in my app.config for each of those databases.
On the startup form I can pull the connection strings from the configuration manager and display them in a combobox. After that, I can click a button and get the connection string from the manager.
My question then arises: Where and how would I store that connection string that I can pull on the startup form? Would I store it in the application properties somewhere or assign it to somewhere global?
I'm still pretty new to coding in this but just need some direction here.
Thanks!
I am trying some stuff out and have a server with 2 databases on it, Live and Test. Basically I want to pick a connection on the first form that gets used throughout the program until it is closed. Everytime you run the program, you have to pick one.
I have two connection string settings in my app.config for each of those databases.
On the startup form I can pull the connection strings from the configuration manager and display them in a combobox. After that, I can click a button and get the connection string from the manager.
My question then arises: Where and how would I store that connection string that I can pull on the startup form? Would I store it in the application properties somewhere or assign it to somewhere global?
I'm still pretty new to coding in this but just need some direction here.
Thanks!