1
I have my connection string that takes the connection variable from App.Config
static String string_conn = ConfigurationManager.ConnectionStrings["bd1"].ConnectionString;
However I put a function that lists the banks in a Combobox in the login form and sends the name of the connection to this main form that contains the connection above, but I need this value that comes from the login form to be in place of this
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 ]
only that of the error, it does not accept the variable even being a string which I can do?