VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Repair and Compact an Access Database using JRO

Databases/Data Access/DAO/ADO   Visual Basic 3.0   Intermediate   Wed 3rd February 2021

This code will let you repair and compact an Access 97 or 2000 (haven't tested on other versions yet) database. Using JRO, when you call the CompactDatabase function, it automatically repairs the database first. You must have a reference to Microsoft Jet And Replication Objects x.x Library in your project.
Also, where I have a DoEvents in the code, there really should be some routine that checks to see when the file is actually deleted. I've tested this on databases that are about 5 megs in size with no problem. If anyone has any ideas (maybe a routine that checks to see when the file is unlocked or deleted), let me now. Thanks and enjoy!!

Rate Repair and Compact an Access Database using JRO (2(2 Vote))
Repair and Compact an Access Database using JRO.bas

Repair and Compact an Access Database using JRO Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters