title: Vb.net not loading access database into datagridview
body: <p>I can't understand why my Access database won't load into a DataGridView for me. I have no errors within my code so I'm unsure as to what is going on. The only error I'm getting is the configuration element is not declared.</p>
  
  <pre class="lang-vb prettyprint-override"><code>Imports System.Data.OleDb
  
  Public Class Form1
  Dim conn As New OleDbConnection
  
  Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  
      Dim objConn As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source = Students.accdb"
      conn.Open()
  
      dataGridShow()
  
  End Sub
  
  Private Sub dataGridShow()
      Dim objDS As New DataSet
      Dim objDT As New DataTable
      objDS.Tables.Add(objDT)
  
      Dim objDA As New OleDb.OleDbDataAdapter
      objDA = New OleDbDataAdapter("SELECT * FROM Students", conn)
      objDA.Fill(objDT)
  
      DataGridView1.DataSource = objDT.DefaultView
  
      conn.Close()
  
  End Sub
  
  End Class
  </code></pre>
  
  <p>My app config looks like this. My database is located in bin/Debug</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?
  &lt;configuration&gt;
    &lt;startup&gt;
      &lt;supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /&gt;
    &lt;/startup&gt;
    &lt;connectionStrings&gt;
    &lt;/connectionStrings&gt;
  &lt;/configuration&gt;
  </code></pre>