Results 1 to 2 of 2

Thread: Storing connection string

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2011
    Posts
    24

    Question 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?

  2. #2
    PowerPoster make me rain's Avatar
    Join Date
    Sep 2008
    Location
    india/Hubli
    Posts
    2,208

    Re: Storing connection string

    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 )
    The averted nuclear war
    My notes:

    PrOtect your PC. MSDN Functions .OOP LINUX forum
    .LINQ LINQ videous
    If some one helps you please rate them with out fail , forum doesn't expects any thing other than this

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width