Compact on close?

J

Jim Shaw

BlankI have "compact on close" general option set for both my front and
back-end dbs.
I do a lot of table add, delete, change activity, from the front-end, on the
back-end db.
The front-end tables are "linked" to the back-end db, therefore my front end
VBA code does not explicitly "open" the back-end, nor does it "close" the
back end.

Will the back-end db be compacted when I close the front-end db via the
"linking" mechanism, or must I use, in the front-end, the compact method in
the DbEngine object to get the back-end db compacted? If so, that raises
the issue of the back-end being compacted while the front-end is still open;
I hope the locking mechanisms take care of that?

Thanks
Jim
 
S

Steve Schapel

Jim,

No, the "Compact on Close" set on your frontend does not compact the
backend database.

Yes, you can use the DBEngine.CompactDatabase method to compact the
backend. Enclosing this in an If...Then to check for the existence of a
backend LDB may be sufficient safeguard.
 

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