The point is, whole thing act as a string,Dsn=dsn_name;
Trusted_Connection=yes;Uid=usrName;Pwd=some+Password;
so, +
act as a character, it does not act as concatenation.
string s = String.Format("Dsn={0};
Trusted_Connection=yes;Uid={1};Pwd={2}","dsn_name","usrName",some+"Password") ;
you can try String.Format
method to inject string values to appropriate places. I am assunming that some
is a string variable.
Then, assign s in the code.
ConfigurationSettings.AppSettings["connstr"] =s;
Edited:
1.Did you try bringing whole thing to a single line, if you separate it with a ; then there occurs a problem.
2.If this is a authentication failure in the first place, you have to check weather your password user name are correct. you have to add what ever your password after pwd=