I am supporting a 2003 Access database with a front and backend and I know almost nothing about Access. It appears if I run the Compact and Repair Databse command from within Access that will only compact the frontend. I searched and found a bunch of stuff on comacting the backend but to be honest I don't understand what they are talking about or where to start. Can someone walk me through running a compact command on the backend?
There is also a compact function with DAO, but this is a JET compact, not an Access one (and there is a difference). But that's fine for a BE, which would be data only.
If you go MX's rounte, save that as a batch file and run from task scheduler in off-hours if you don't want to do it manually.
Jim.
jmoody
ASKER
Jim, what's the difference between the JET compact and the Access one? Which one would be better to use? I see a jetcom.exe in the same directory as the backend so maybe that has been used previously.
I got an error when tyring to open it directly and run the Compact so maybe I will try the command instead.
Jim Dettman (EE MVE)
When you do a JET compact (through the DB engine), it can only work with tables and indexes, but not anything outside of that becasue JET by itself knows nothing about Access Objects (which are all stored as BLOBS).
When you do it through the Access UI however, your running Access and it knows all about those objects.
I don't know what specifically is different about the process, just that the two are different. Access knows how to deal with Access objects and check/optimize them , JET doesn't.
With a BE DB all you have is data, so it doesn't matter which you use, but on a FE, you would always want to do a compact through the UI or command line.
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
jetcom.exe is a utility that was mainly created to 'fix' (using the term loosely) dbs that were corrupted to a point, that the 'regular' C&R could not fix. I've had only minimal success using it. Also, it does not work past A2003 ... ie, on the ACCDB format.
DBEngine.CompactDatabase "Northwind.mdb", "Northwind_compacted.mdb"
If you go MX's rounte, save that as a batch file and run from task scheduler in off-hours if you don't want to do it manually.
Jim.