I'm using Access as my client and SQL Server for my data and I was wondering if anyone knew how I can get my table/stored procedure descriptions to show on my client. All I get are dbo names and types but nothing in description or date created. Any suggestions?
You can do it through VBA code. Here is an example. Check out the various collections in the Catalog. This example is looking at the Table Collection.
Function catalogTC()
'-- set reference to ADOX library
'- Microsoft ADO Ext. 2.6 for DDL and Security
'-- Microsoft ActiveX data objects 2.6 library also needed for ADO
Dim cg As New ADOX.Catalog
Dim tb As New ADOX.Table
Dim cn As adodb.Connection
Dim cl As Column
Dim pp As Property
Set cg.ActiveConnection = CurrentProject.Connection
For Each tb In cg.Tables
Debug.Print "table name = "; "-------"; tb.Name; "--------"; tb.Type
' If tb.Type = "TABLE" Then
' If tb.Type = "LINK" Then
' For Each pp In tb.Properties
' Debug.Print "property name = "; pp.Name
' Debug.Print "property value = "; pp.Value
' Next
If (tb.Type = "TABLE" And tb.Name = "Categorys" Then
For Each cl In tb.Columns
Debug.Print "name = "; cl.Name
For Each pp In cl.Properties
Debug.Print "property name = "; pp.Name
Debug.Print "property value = "; pp.Value
Next
Next
End If
Next
ADOX treats the various meta data in the source it is connected to, as a catalog with collections of items. So, tables, views, fields and such are collections in the ADOX catalog. The catalog is an ADOX term in reference to the source, in this case, the Access program as indicated by the "Set cg.ActiveConnection = CurrentProject.Connection".
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.