|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
General Microsoft Access database question
When an Access database is heavily used I've noticed that the size of the .mdb file grows larger and larger. What is the reason for this? And what does a developer need to do to prevent it from growing too quickly? I've found that I have to compact my Access database very often.
|
|
#2
|
||||
|
||||
|
I believe Access grabs more space for the creation of temporary objects and this space isn't reclaimed when the objects are destroyed (the database doesn't auto-shrink).
If you're using Access 2000 or later, they added an option to the Tools->Options->General tab that allows you to "Compact on Close". Otherwise you just have to do it manually or you can create a macro that compacts the database and closes it. It is possible to pass Access a command-line option to open an object at startup. You create a command to start Access and run the compact macro. Then you schedule it to run every night. The database opens, compacts and closes unattended. |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > General Microsoft Access database question |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|