PDA

Click to See Complete Forum and Search --> : Compact & Repair - Access - Resolved


salvelinus
Nov 30th, 2005, 09:10 AM
I have a series of Access db's that aren't explicitly opened, but have another db that imports tables from them.
1. Will the ones whose tables are imported run compact & repair on close (assuming that's set in their options) when the import is done?
2. If so, will the c & r run after each table import (there might be 20 tables imported, which would be too much time overhead).
3. Or can I call c & r on them programatically?
Most of the dbs are only accessed once a month, and we had one get a couple corrupted tables, and it was a real pain to try to repair.
Thanks.

RobDog888
Dec 1st, 2005, 02:54 AM
1. Yes it will be a resource intensive operation if your running it on two or more dbs at the same time, if possible. Might run consecutively.
2. See #1 and if each table is in separate dbs then it may be like #1 and if in the same db then it will run once and should be ok.
3. Yes, you can use the "DBEngine.CompactDatabase " function to C&R a db programmatically.

salvelinus
Dec 1st, 2005, 07:42 AM
Thanks, Rob, I'll check that out. All the tables (in any one operation) are in the same db. There's one for every client.