Public Function FUN_FIELD_TABLE(STR_PATH_BAZA As String, STR_BAZA_NAME As String, STR_TABLE_NAME As String)
'Dim adoxCat As New ADOX.Catalog
Dim adoxCat As ADOX.Catalog
Dim adoxTbl As ADOX.Table
Dim Field As ADOX.Column
Dim strDBPath As String
Set adoxCat = New ADOX.Catalog
strDBPath = FUN_Patch_File(STR_PATH_BAZA, STR_BAZA_NAME) '“C: ExamplDBMyDB.mdb”
adoxCat.ActiveConnection = "provider=Microsoft.JET.OLEDB.4.0;" & _
"data source=" & strDBPath
For Each adoxTbl In adoxCat.Tables
If adoxTbl.Name = STR_TABLE_NAME Then
For Each Field In adoxTbl.Columns
MsgBox Field.Name
MsgBox Field.Properties("Type")
MsgBox Field.Properties("Value")
Next
End If
Next
'Set rst = Nothing
End Function
|