Sub ListDataTypes()
Dim conn As ADODB.Connection
Dim rst As ADODB.Recordset
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & CurrentProject.Path & "\mydb.mdb"
Set rst = conn.OpenSchema(adSchemaProviderTypes)
Do Until rst.EOF
Debug.Print rst!Type_Name & vbTab _
& "Size: " & rst!Column_Size
rst.MoveNext
Loop
rst.Close
conn.Close
Set rst = Nothing
Set conn = Nothing
End Sub
|