title: Change sql server from visual basic form
body: <p>I want to let the users change the sql server connetion manually from a settings form because the application will be used in many company</p>
  
  <p>i tried this:</p>
  
  <p>i create a string in settings "sqlservername"</p>
  
  <p>then in the loading form i put a textbox "txt_sqlservername" and savebutton</p>
  
  <p>the button event</p>
  
  <pre><code>My.Settings.sqlservername = Me.txt_sqlservername.Text
      My.Settings.Save()
      MsgBox("Server Name Was Updated", MsgBoxStyle.Information, "Videos Database - New Server Name")
      Me.Close()
  </code></pre>
  
  <p>and this is my connection string</p>
  
  <pre><code>Public SQLCon As New SqlConnection With {.ConnectionString = "Server=My.Settings.sqlservername;Database=Videos;User=sa;Pwd=123456;"}
  </code></pre>
  
  <p>when i open my main form nothing shown</p>
  
  <p>any help?</p>