How do you print out details of the file structure of a database?

S

Sam NCW

I would like to be able to print out all the details of the database
structure. For example:
Name of Table
Name of Field
Data type
Length of Field
Validation check
etc.
 
B

BruceM

Tools > Analyze > Documenter. Be sure to click the Options buttons and look
at the choices there. I think it will do everything you need.
 
B

BruceM

I don't know what a CHECK Constraint is; all I know is that the method I
described has worked for me. Duane's link seems to provide some additonal
functionality, but I have not tested it.

I am not asking how to evaluate software, nor was the OP, from what I could
tell. The question was about producing details that I believe can be
produced through the Documenter. I doubt that any product is going to meet
all of my needs, and I am sure that in most cases I have little ability to
influence the provider to customize their product. I do wish MS was more
responsive to suggestions, but I wish the same thing of every provider.

onedaywhen said:
Do you have a suggestion about what to do instead?

If you are asking me how to get a *full* list of CHECK constraints then
sorry, I don't have any code I can share but I can give you some hints.
Using the ADODB OpenSchema method, first use adSchemaTableConstraints
with the table name then filter the resulting recordset for
CONSTRAINT_TYPE = 'CHECK'; however, this only gets you the CHECK name
and definition. Use adSchemaCheckConstraints and the resulting
recordset for CONSTRAINT_NAME to get the table against which the CHECK
was defined (and column name if that matters to you, however for Jet
there seems to be no way of defining a column-level CHECK). Remember
that Jet, unlike other engines (including SQL Server), does allow
multiple tables to be referenced in a CHECK constraints, but only
changes to the table against which it was defined will cause the CHECK
to be invoked. There are a few of gotchas: for Access-created
Validation Rules it is not a simple 1:1 mapping between CONSTRAINT_NAME
values in each recordset: adSchemaTableConstraints
[<table>].[<column>].ValidationRule maps to adSchemaCheckConstraints
[<column>].ValidationRule; also, the CONSTRAINT_NAME in the
adSchemaTableConstraints rowset is sometimes terminated with a Chr$(0),
sometimes not.

If you are asking me how to evaluate software, you draw up a list of
requirements (as the OP has done) and see if they can be satisfied by
trialling the software (as I have done). I would expect that as a
prospect you have a better chance of influencing a provider other than
Microsoft to extend their existing functionality to match your
requirements.

Perhaps someone can post here if they know of a documenter that
includes all CHECK constraints? I cannot.

Jamie.
 
Top