Can't send selected table data to DataTable
I can't understand the problem in my code. I want that when user selects a table name it would be shown on datagridView. But I can't send my data to dataTable. When I'm debugging dt variable is null. What I'am missing? 

Here is the code I have been written so far:

            public void ShowSelectedTable(string tableName, DataGridView grid, string   dbFilePath) 
        {
            try
            {
                OleDbConnection dbConn = new OleDbConnection();
                dbConn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + dbFilePath;
                dbConn.Open();

                dbSet = new DataSet();
                dbAdapt = new OleDbDataAdapter();
                dbAdapt.SelectCommand = new OleDbCommand("Select * From " + tableName + ";", dbConn);
                dbAdapt.Fill(dbSet);
                dt = dbSet.Tables["TableName"];
                grid.DataSource = dt;
            }
            catch(Exception ex)
            {
                MessageBox.Show("error");
            }
        }




Can't send selected table data to DataTable
===

I can't understand the problem in my code. I want that when user selects a table name it would be shown on datagridView. But I can't send my data to dataTable. When I'm debugging dt variable is null. What I'am missing? 

Here is the code I have been written so far:

            public void ShowSelectedTable(string tableName, DataGridView grid, string   dbFilePath) 
        {
            try
            {
                OleDbConnection dbConn = new OleDbConnection();
                dbConn.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + dbFilePath;
                dbConn.Open();

                dbSet = new DataSet();
                dbAdapt = new OleDbDataAdapter();
                dbAdapt.SelectCommand = new OleDbCommand("Select * From " + tableName + ";", dbConn);
                dbAdapt.Fill(dbSet);
                dt = dbSet.Tables["TableName"];
                grid.DataSource = dt;
            }
            catch(Exception ex)
            {
                MessageBox.Show("error");
            }
        }



