Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DIFF two Access Databases

Status
Not open for further replies.

JerryLan

Programmer
Jan 26, 2005
27
US
I need to programatically print differences between two Accesss database schemas. I don't care about the data, just the schema.
 
No one has any ideas?
This really seems needed as Access Design View requires you to click on each field name to see it's size, type and properties. This makes it hard to compare two similar tables/databases side-by-side.
 
JL,
How'd we miss you? You can iterate through all of the tables, and print the schema stuff like so:

Private Sub CheckTables()
Dim tdf As DAO.TableDef
Dim fld As DAO.Field
For Each tdf In CurrentDb.TableDefs
Debug.Print tdf.Name
For Each fld In tdf.Fields
Debug.Print fld.Name
Debug.Print fld.OrdinalPosition
Debug.Print fld.Type
Debug.Print fld.Size
Next
Next
End Sub

Of course, you would want to omit the system files (MSys*); etc.

I'd probably throw all of the info into a table and just do a simple little report...

Tranman




"Adam was not alone in the Garden of Eden, however,...much is due to Eve, the first woman, and Satan, the first consultant." Mark Twain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top