dbTalk Databases Forums  

Wanted: Sample DAO program to enumerate Metainfo

comp.database.ms-access comp.database.ms-access


Discuss Wanted: Sample DAO program to enumerate Metainfo in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Siegfried Heintze
 
Posts: n/a

Default Wanted: Sample DAO program to enumerate Metainfo - 07-28-2003 , 05:40 PM






Anyone have a sample DAO program that prints out metainfo on tables and
fields? VB6 will do, I suppose. I need to do it from C# or C++.



Reply With Quote
  #2  
Old   
Kelly Cromwell
 
Posts: n/a

Default Re: Wanted: Sample DAO program to enumerate Metainfo - 07-28-2003 , 06:42 PM






Does it have to be DAO? I know you can do it via ADOX (ADO Extensions)
You can look up these objects in the ADOX help file. That's your best bet.

For Table Names:
=============

Dim cat As New ADOX.Catalog
cat.ActiveConnection = YourConnection

Dim table As New ADOX.table
For Each table In cat.Tables
msgbox table.Name
Next


For Fields:
========

Dim tblTable As ADOX.table
Dim catCatalog As New ADOX.Catalog

catCatalog.ActiveConnection = YourConnection

Set tblTable = catCatalog.Tables("TableName")

For each Column in tblTable.Columns
msgbox Column.Name 'I think
Next Column


"Siegfried Heintze" <sieg_heintze (AT) yahoo (DOT) com> wrote

Quote:
Anyone have a sample DAO program that prints out metainfo on tables and
fields? VB6 will do, I suppose. I need to do it from C# or C++.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.