Sorry, I didn't originally see that as an option. Now I have the code and I'm
getting this error:
Cannot perform this operation; features in this version are not available in
databases with older formats.
Dim sOldPath As String = "c:\temp\v2000.mdb"
Dim sNewPath As String = "c:\temp\v97.mdb"
Dim db As DAO.Database
Dim de As New DAO.DBEngineClass
db = de.OpenDatabase(sOldPath)
MessageBox.Show(db.Version)
'This shows 4.0
db.Close()
de.CompactDatabase(sOldPath, sNewPath, dbLangGeneral, dbVersion30,
dbLangGeneral)
'This is the line where I get the error.
I'm referencing DAO 3.6. If I reference DAO 3.5, I never get past the open
of the v2000 database.