Получить список таблиц БД Access
Опубликовано Декабрь 7, 2015 автором Памирыч
Dim cn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\1.mdb")
cn.Open()
Dim da As New OleDb.OleDbDataAdapter
da.SelectCommand = New OleDb.OleDbCommand("Select Name from Msysobjects where type = 1", cn)
Dim tbl As DataTable
tbl = cn.GetOleDbSchemaTable(OleDb.OleDbSchemaGuid.Tables, New Object() {Nothing, Nothing, Nothing, "Table"})
For i = 0 To tbl.Rows.Count - 1
MsgBox ((tbl.Rows(i)!Table_Name.ToString))
Next