Compacting mdb files in Access

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.
 
A

Arvin Meyer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top