title: How to define a Sql Server connection string to use in VB.NET?
body: <p>How to: <code>connectionString</code>?</p>
  
  <p>Hopefully a simple question, but I am too new to <code>Visual Basic</code> to understand :
  <a href="http://msdn.microsoft.com/en-us/library/d7469at0.aspx" rel="nofollow noreferrer">http://msdn.microsoft.com/en-us/library/d7469at0.aspx</a>...</p>
  
  <p>I am writing an app in <code>VB</code> and trying to connect it to a "Local Database" / "Dataset".</p>
  
  <p>I received help earlier today to get the code listed below and it appears it will work just fine, except I have no idea how to connect my application to my dataset. From the reading I have been doing, it seems the connectionString would be to connect it to a database that was created with SQL Server. ???</p>
  
  <p>On my VB Windows Form Application, I simply did "Add New Item" then "Local Database" and it asked me what type of database model and I selected "Dataset".</p>
  
  <p>I only have two tables and just need to be able to connect to them. Here is the code or at least the idea of what I would like to do. Please help</p>
  
  <pre><code>    Using sqlCon = New SqlConnection(connectionString)
          sqlCon.Open()
          Dim sqlText = "UPDATE appTable SET clickCount + 1 " &amp; _
              "WHERE appName = @name"
          Dim cmd = New SqlCommand(sqlText, sqlCon)
          cmd.Parameters.AddWithValue("@name", appName)
          cmd.ExecuteNonQuery()
      End Using
  </code></pre>
  
  <p>I am so sorry for this poorly phrased question, I have been reading and trying to learn this for too long and have frustrated myself. I come from Python with a lot less syntax and "rules" and I feel I could be way farther on this project and to be stuck on simply connecting to the "database" has me beyond frustrated :/</p>
  
  <p>Thanks for assistance in advance. </p>
  
  <p>answer : There is an App.config file in my Solution Explorer with the connectionString
  <strong>Data Source=(LocalDB)\v11.0;AttachDbFilename=|DataDirectory|\gadgetDatabase.mdf;Integrated Security=True</strong></p>