Re: get database information
You could loop through all the tables using Adox (if they've installed it) and output to the screen. Then loop through the columns on each table (listing under the table name?).
Re: get database information
Er, ok.....how do I go about this?!
Re: get database information
This article might help.
As far as ADOX goes, you'll need a reference to msadox.dll (Microsoft ADO Ext. 2.8 for DDL and Security) and you can get all sorts of schema info.
However, ADOX was designed and built for Access, so other DBMS are patchily supported. There are loads of posts in this forum about how best to use it.
Re: get database information
thebloke,
Open the database using ADO and try this:
VB Code:
Dim dbSchema as ADODB.Recordset
Dim i as Integer
Set dbSchema = New ADODB.Recordset
dbSchema = db.OpenSchema(adSchemaTables, Array(Empty, Empty, Empty, "TABLE"))
For i = 0 to dbSchema.Fields.Count - 1
Debug.Print dbSchema.Fields(i)
Next i
Enumerate through the fields property for the names of the columns.
Re: get database information