Compact on Close

hfsitumo2001

Member
Local time
Today, 15:37
Joined
Jan 17, 2021
Messages
394
In order to improve performance, is it good, if on Option on current database, we put " Compact on Close" to True?
 
Given that you split your database, and each user's front end only has non-data objects (forms, reports, queries), I would recommend not checking this option.
 
Given that you split your database, and each user's front end only has non-data objects (forms, reports, queries), I would recommend not checking this option.
Thank you Isaac.
 
There have been reports of compact on close causing problems with your database. However I have always had it checked and allow my databases to compact on close, and I've never had a problem.
 
In certain circumstances, compact on close can cause corruption.
Its far less common now than used to be the case 20+ years ago, but I wouldn't risk it either.
It will just slow down closing your FE database for little benefit.
As Isaac said there should be little need to compact the FE in a split database as it shouldn't get 'bloated'
 
As Isaac said there should be little need to compact the FE in a split database as it shouldn't get 'bloated'

From my point of view as a developer, I find it best to have compact on Close switched on because as you develop the database it does get bloated as you add and delete things.

I would agree that if you release it to your customer, then it's probably best to have it switched off.

The best way to tackle the possibility of corruption whilst developing is to make regular backups, because at some stage you are likely to get some sort of corruption...
 
Yes I see your point, but I split my databases early on during the development cycle and prefer to have control over when compacting is done.
If I were to implement compact on close, I would also implement creating an automatic backup before closing
 
I hard code my network ID (and the one I use if I develop at home) in my apps apps. If it is "me", the app always asks if it should back up on close. I was using the last update date in the MSysObjects table to determine if I changed anything but this date is not reliable so I prompt or just let it always back up. For some apps, I even export all objects to text. When I'm connected to a network, the backup goes to two places. One on my c: drive and the other on a network drive. You can't ever have too many backups. I only have to remember to shut down the app every hour or so and the backup happens automatically. I mostly develop on a local drive so compacting isn't an issue. If you develop on a network drive, I would NEVER set the compact on close option to yes. In fact, I don't compact even manually when the .accdb is on a network drive. I copy it local, compact it, and put it back.
 

Users who are viewing this thread

Back
Top Bottom