Is there a way to write code to compact and repair your database? I am trying to compact and repair in code before I save a copy in the server. I know you can go to manage, but trying to make a better way.
Anyone know how to Compact and Repair using VB?
Collapse
X
-
A couple of things.
First, as illogical as it seems, C & R is considered to be a common cause of data corruption! Because of this, the native Access "Compact on Close" option is possibly one of the worst features they've ever come up with! You should always back up an Access file before doing a C & R, which is the reverse of what you're speaking of doing.
Secondly, one has to ask why you feel the need to do this so often that going into menu to do it is a burden? With a correctly designed app it is seldom necessary to do a C & R on a regular basis.
Linq ;0)>
Comment