title: Setting DataSource in VB.NET
body: <pre><code>Dim inc As Integer
  Dim MaxRows As Integer
  Dim con As New OleDb.OleDbConnection
  Dim dbProvider As String
  Dim dbSource As String
  Dim dA As OleDb.OleDbDataAdapter
  Dim dS As New DataSet
  Dim SQL As String
  
  Private Sub AbrirToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles AbrirToolStripMenuItem.Click
      Dim strFileName As String
      Dim ClikedOk As Integer
  
      OpenFD.InitialDirectory = "C:\"
      OpenFD.Title = "Ubica la base de datos"
      OpenFD.Filter = "Agenda|Agenda.mdb"
      OpenFD.ShowDialog()
  
      If ClikedOk = DialogResult.OK Then
          strFileName = OpenFD.FileName
          dbProvider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;"
          dbSource = "Data Source = Agenda.mdb"
  
          con.ConnectionString = dbProvider &amp; dbSource
          con.Open()
          SQL = "SELECT * FROM Contactos"
          dA = New OleDb.OleDbDataAdapter(SQL, con)
          dA.Fill(dS, "Agenda")
  
          con.Close()
          MaxRows = dS.Tables("Agenda").Rows.Count
          inc = -1
  
      End If
  End Sub
  </code></pre>
  
  <p>What I want to do is this:<br>
  The user should press Menu Item and select the Data Base file, then the Data Source would be directed to where the user pointed the Data Base file. 
  What should I put in the line "dbSource = Data Source = ..."? Access Data Base is .mdb because I got troubles using .accdb</p>