I have my connection string that takes the connection variable from the App.Config
static String string_conn = ConfigurationManager.ConnectionStrings["bd1"].ConnectionString;
But I put a function that lists the banks in a Combobox in the login form and sends the name of the connection to that main form that contains the above connection, but I need this value that comes from the form login to be in place of that
ConnectionStrings ** ["bd1"] **
For example:
String nomeConexao = Form1.LoginInfo.StringConexao;
static String string_conn = ConfigurationManager.ConnectionStrings[nomeConexao ].ConnectionString;
In other words, instead of
ConnectionStrings["bd1"]
Stay
ConnectionStrings[nomeConexao ]
I'm not sure what to do,