public void select_datagrid() { //create the database query string query = "SELECT * FROM mytable"; //create an OleDbDataAdapter to execute the query OleDbDataAdapter dAdapter = new OleDbDataAdapter(query,ch); //ch est un String c'est la chaine de connexion utilsée //create a command builder OleDbCommandBuilder cBuilder = new OleDbCommandBuilder(dAdapter); //create a DataTable to hold the query results DataTable dTable = new DataTable(); //fill the DataTable dAdapter.Fill(dTable); //the DataGridView //BindingSource to sync DataTable and DataGridView BindingSource bSource = new BindingSource(); //set the BindingSource DataSource bSource.DataSource = dTable; //set the DataGridView DataSource dataGridView1.DataSource = bSource; dAdapter.Update(dTable); }