Storing connection string
I've been learning all about manipulating databases using VB. DOing well with it but I need to dynamically create a connection string.
I'm almost there, I can populate combo boxes with sq servers and databases and create the correct connection strings
But I'm trying to store the string values and I have this code:
Code:
Private Sub btnGenerateResource_Click(sender As System.Object, e As System.EventArgs) Handles btnGenerateResource.Click
Dim config As Configuration = _
ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None)
Dim csSection As ConnectionStringsSection = config.ConnectionStrings
csSection.ConnectionStrings.Add(New ConnectionStringSettings("MyConString", txtConnString.Text))
config.Save()
ConfigurationManager.RefreshSection("connectionStrings")
End Sub
All this seems to work but which file is this saved to? I've opened the app.config file and the information isn't stored there. Am I missing something?
Re: Storing connection string
regarding connection string storage i think this link of jmc is fine and simple
secondly connection string must be secured :eek:, 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 :) )