regarding connection string storage i think this link of jmc is fine and simple

secondly connection string must be secured , i mean not physically but as a not human readable script that's it.
to do so what need to be learned to play around on our is , system.encryption a complicated subject ( for me ofcourse )