Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Data Dictionary
Message
De
16/04/1999 14:32:36
 
 
À
Tous
Information générale
Forum:
Visual Basic
Catégorie:
Bases de données DAO/RDO/ODBC/ADO
Titre:
Data Dictionary
Divers
Thread ID:
00209123
Message ID:
00209123
Vues:
68
Hi everybody,

I am trying to build a data dictionary for an Access database. I thought I'd start using the TableDef and Field objects in VB and populate a table with all the table names and corresponding field(column) information from the Access database. Then I'd create a report in Access based on that table. This would save a lot of typing time! The problem is some pieces of info about tables such as whether or not a field has an index on, number of decimal points for a Number data type, and whether or not a given field is a primary key for a table don't have a corresponding Properties name in Vb's Fields collection. How do I get those kind of information in my data dictionary table? How do I create properties if I have to?

Any help is greatly appreciated.

Here's the relevant part of my code:

....
Set claims = Workspaces(0).OpenDatabase(App.Path & "\myaccess.mdb")
For Each table In claims.TableDefs
For Each fld In table.Fields
' Data1 is a data control
Data1.Recordset.AddNew
Data1.Recordset!table_name = table.Properties("name")
Data1.Recordset!field_name = fld.Properties("name")
Data1.Recordset!field_type = Str(fld.Properties("type"))
Data1.Recordset!field_length = Str(fld.Properties("size"))
Data1.Recordset!nullable = fld.Properties("required")
'Data1.Recordset!decimal = fld.Properties("????")
'Data1.Recordset!Index = fld.Properties("????")
Data1.Recordset!descrip = fld.Properties("Description")
Data1.Recordset!azl = fld.Properties("AllowZerolength")
Data1.Recordset!attr = fld.Properties("attributes")
Data1.Recordset.Update
Next
Next
Exit Sub
....
Yousef Esmaeilpour
Systems Consultant
InfoDoc Inc.
Cleveland, OH
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform