title: retrieving data in VB from SQL
body: <p>I use Visual Basic 2010 and Microsoft SQL Server 2008. I have my database and my table and i made the connection (at least i think i did) in VB using only the interface.</p>
  
  <p>What i want to know is how to get data from the database and use it into my VB project. I have of course searched for solutions already but the differences i find only confuse me more. What i need to know are the basics, the tools/objects and procedures to retrieve the data.</p>
  
  <p>What i try to do at the moment is make a simple selection and put that data into a listbox right when the program starts, like this:</p>
  
  <pre><code>Public Class Form1
  
      Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
          SqlConnection1.Open()
  
  
  
          SqlConnection1.Close()
  
      End Sub
  End Class
  </code></pre>