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

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
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);
}

View the full article
 
Back
Top