title: How to connect access database in c#
body: <p>I have access database file with 7 tables in it but I don't know how to connect and show all tables, If some one can help me? </p>
  
  <p>this is my code but it doesn't show anything</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      OleDbConnection conn = new OleDbConnection();
      String connection = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\\Tables.accdb;Persist Security Info=True";
      string sql  = "SELECT Clients  FROM Tables";
      conn.ConnectionString = connection;
      conn.Open();
      DataSet ds = new DataSet();
      DataGridView dataGridView1 = new DataGridView();
      BindingSource bSource = new BindingSource();
      OleDbDataAdapter adapter = new OleDbDataAdapter(sql,conn);
      adapter.Fill(ds);
      //conn.Close();                               
      dataGridView1.DataSource = ds;
  </code></pre>