Compacting mdb files in Access

  • Thread starter Thread starter Jess
  • Start date Start date
J

Jess

My application has the facility to compact files. I am
going to be distributing my Access 97 app to all users
irrespective of their Office version.

Will I have problems with the compaction routine under
these circumstances?

My compaction is run in code, thus:

DBEngine.CompactDatabase OldDB, NewDB

Thanks in anticipation.
 
Jess said:
My application has the facility to compact files. I am
going to be distributing my Access 97 app to all users
irrespective of their Office version.

Will I have problems with the compaction routine under
these circumstances?

My compaction is run in code, thus:

DBEngine.CompactDatabase OldDB, NewDB

It shouldn't. However if a later version user has ADO as well as DAO in his
references, you should, as good practice, disambiguate. In this case
DBEngine cannot be referenced by ADO, so there isn't much to worry about.
I'd still, for consistency, disambiguate with:

DAO.DBEngine.CompactDatabase OldDB, NewDB

Where you will have trouble is with any recordset object which is not
disambiguated. Make sure you use:

DAO.RecordSet
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top