Hi friends
I find this error

in this code but I do not know is what I will add con.open () and con .close () to the code
Program.cmd.CommandText = "select utilisateur.User_name,site.Libelle_site,profil.Libelle_profil from utilisateur,site,profil,autorisation where utilisateur.Id_user=autorisation.Id_user and site.Id_site=autorisation.Id_site and profil.Id_profil=autorisation.Id_profil";
Program.dr = Program.cmd.ExecuteReader();
DataTable dt = new DataTable();
dt.Load(Program.dr);
dataGridView1.DataSource = dt;
dataGridView1.Refresh();

Nilesh ShahRank #42 · 34.2K reputationPosted Jun 20, 2017, 6:32 PM EDT
Rafnas T PRank #280 · 8.8K reputationPosted Jun 20, 2017, 11:33 PM EDT
Rafnas T PRank #280 · 8.8K reputationPosted Jun 20, 2017, 11:35 PM EDT
ma oumlRank #3,005 · 479 reputationPosted Jun 21, 2017, 3:27 AM EDT
Rafnas T P
Rafnas T PRank #280 · 8.8K reputationPosted Jun 21, 2017, 3:35 AM EDT
Rafnas T PRank #280 · 8.8K reputationPosted Jun 21, 2017, 3:38 AM EDT
ma oumlRank #3,005 · 479 reputationPosted Jun 21, 2017, 5:10 AM EDT
Rafnas T P
Bharathi RajaRank #1,778 · 842 reputationPosted Jan 31, 2018, 11:45 PM EST