title: select data from Dataset Vb.Net
body: <p>ok first ill explain what ive done.</p>
  
  <p>First I imported an access db into my vb app it then named the dataset etc.</p>
  
  <p>this is how my dataSet looks:
  1 table
     4 columns</p>
  
  <p>so Far i have this:</p>
  
  <pre><code>Dim ds As ElementsDataSet
      Dim dt As ElementsDataSet.ElementsDataTable
      Dim conn As SqlConnection = New SqlConnection("Data Source=|DataDirectory|\Elements.accdb")
      Dim selectString As String = "Select Atomic Mass FROM Elements WHERE No =" &amp; mol
      Dim cmd As New SqlCommand(selectString, conn)
  If conn.State = ConnectionState.Closed Then conn.Open()
  
  Dim datareader As SqlDataReader = cmd.ExecuteReader()
  
  While datareader.Read = True
  
      MessageBox.Show(datareader.Item("Atomic Mass"))
  
  End While
  
  datareader.Close()
  </code></pre>
  
  <p>and upon executing this I get this error:</p>
  
  <pre><code>An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in System.Data.dll
  Additional information: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
  </code></pre>