Bonjour tout le monde
Svp j'ai vraiment besoin d'aide
Svp comment faire pour afficher les noms de tous mes tables de ma database Access dans une colonne DataGrdidView1
J'ai essayé avec ce code mais malheureusement j'ai pas reussi a faire
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
        If Conne.State <> ConnectionState.Open Then Conne.Open()
        DataGridView1.DataSource = Nothing
        Dim InfoTable As DataTable
        InfoTable = Conne.GetOleDbSchemaTable(OleDb.OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "TABLE"})
        Dim Cmd As OleDb.OleDbCommand = New OleDb.OleDbCommand("SELECT * From [" & InfoTable.Rows(0)("TABLE_NAME").ToString() & "]", Conne)
        Dim Adp As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(Cmd)
        Dim DS As DataSet = New DataSet()
        Adp.Fill(DS)
        DataGridView1.DataSource = DS.Tables(0)
Cordialement
MADA