' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
Imports System
Imports System.Data
Imports System.Data.OleDb

Class MainClass
    Public Shared Sub Main(ByVal args As String())
        Dim con As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Databases\MSAccess\Test.mdb")
        con.Open
        Dim criteria As String() =  {Nothing, Nothing, Nothing, "TABLE"}
        Dim dt As DataTable = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, criteria)
        Dim i As Integer
        For i = 0 To dt.Rows.Count - 1
            Console.WriteLine(dt.Rows(i)(2))
        Next
        con.Close
    End Sub
End Class 
