|
-
Jun 19th, 2000, 03:46 AM
#1
Thread Starter
Addicted Member
Is there a way to repair and compact an MS access 97 database via VB code?
Thanks,
Thai
-
Jun 19th, 2000, 06:12 AM
#2
Junior Member
It's Simply easy.
To Compact a DataBase just write
DBEngine.CompactDatabase DBName, NewDBName
To Repair a DataBase
DBEngine.RepairDatabase DBName
Where DBNAME is your DataBase
And NewDBNAME is the database after compact.
If you place your cursor on the word CompactDatabase and then press the F1 key, you will see more info.
I hope that helps you
-
May 21st, 2003, 01:20 PM
#3
Hyperactive Member
Hello John. Is there a reference or a component I must install before using DBEngine? Thanx
Top Tip: You can make friends and impress the opposite sex at geeky cocktail parties by saying "DB" instead of database. - Karl Moore
-
May 21st, 2003, 05:26 PM
#4
Hyperactive Member
in order to run the code John_Andrikopoylos gave, you need a reference to DAO.
Note: that version 3.6(and above) of DAO does not have a repair method. The Repair method and the Compact method have been consolidated into the Compact method alone.
Also, if you program already has a reference to ADO then you should look into using the JRO libraries instead of DAO.
-
May 22nd, 2003, 02:21 PM
#5
Hyperactive Member
Thanks dude. I already solved this using JRO, which repairs and compacts the DB.
Top Tip: You can make friends and impress the opposite sex at geeky cocktail parties by saying "DB" instead of database. - Karl Moore
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|