Enumerating Table Fields in ADO?

  • Thread starter Thread starter DS
  • Start date Start date
D

DS

Anybody know a good KB or MSDN (or other) article that
shows how to programmitically list out the fields
(including type and size) of all local tables in a
database.

I've been able to enumerate tables using an ADOX examples,
but I'm stuck at getting down to the field level.
 
DS said:
Anybody know a good KB or MSDN (or other) article that
shows how to programmitically list out the fields
(including type and size) of all local tables in a
database.

I've been able to enumerate tables using an ADOX examples,
but I'm stuck at getting down to the field level.

I'd use DAO for this, not ADOX, but using ADOX you should be able to get
the necessary information out of the Columns collection of each Table
object in the catalog. I believe you'll have to interpret the Type
property of the column to see what size the field is, for field types of
fixed lengths. What have you tried, and how are you stuck?
 
Back
Top