Here is a basic arrangement of the ADOX Object Model for ADO Extensions.

ADOX Object Tree
  • Catalog
    • Table in Tables
      • Property in Properties
      • Column in Columns
        • Property in Properties
      • Index in Indexes
        • Property in Properties
        • Column in Columns
          • Property in Properties
      • Key in Keys
        • Column in Columns
          • Property in Properties
    • Group in Groups
      • User in Users
    • User in Users
      • Group in Groups
    • Procedure in Procedures
      • Command
    • View in Views
      • Command

Here is a simple VB example that gets data from an Excel spreadsheet and sticks it into an array using ADOX objects.

Dim strCnn As String, cnn As ADODB.Connection
Dim cat As ADOX.Catalog, tbl As ADOX.Table, col As ADOX.Column
Dim iTbl As Integer, iCol As Integer
Dim strTbl__ColNames(1 to 100, 1 to 10000) As String

strCnn = "DRIVER={Microsoft Excel Driver(*.xls)}; ReadOnly=1; DBQ=c:\EG1.xls"
Set cnn = New ADODB.Connection
cnn.Open strCnn

Set cat = New ADOX.Catalog
cat.ActiveConnection = cnn1
iTbl = 0
iCol = 0
For Each tbl In cat.Tables
    iTbl = iTbl + 1
    For Each col In tbl.Columns
        iCol = iCol + 1
        strColNames(iTbl, ICol) = tbl.Name & "__" & col.Name
    Next col
Next tbl


GeorgeHernandez.comSome rights reserved