I am fairly new to c#. So far so good with learning. I do have one question, well maybe two.
How do you create a user dialog to allow the selection of a connection string when the project starts? I have 4 databases with the same schema and would like to allow the user to choose which to connect to when they launch the program.
I am currently using datasets but am willing to learn/try another method to acheive the desired result.
Put them into the config’s
connectionStringsarea and provide the user with a ComboBox containing the names of the connection strings. Then use the one selected.In your config:
In your code, add the connection strings to a ComboBox:
Get the name from the ComboBox, then get the connString you need and use it: