Quantcast
Channel: Windows Forms Data Controls and Databinding forum
Viewing all articles
Browse latest Browse all 2535

c#.NET How to load an unknown number of tables into a single datagridview

$
0
0

please i am working on a project with an access database that has as many tables as there are customers, and the tables are named after the customers. at the form_load event of my application, i want the access database to load all tables and their content (they have the same column number and names) into a datagridview. pls how do i go about this, im pretty new to winforms, so any help will be appreciated and its urgent, this is how far i have gone


private void Form1_Load(object sender, EventArgs e)
        {
            OleDbConnection Connection = new OleDbConnection(@"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\\Users\\BolorunduroWB\\Documents\\Access\\MainClientDataFile.mdb;Persist Security Info=False;");
            Connection.Open();
            ds = new DataSet();
            da = new OleDbDataAdapter("SELECT * ", con);
            da.Fill(ds);
        }

      


Viewing all articles
Browse latest Browse all 2535

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>