|
-
Oct 15th, 2000, 09:12 PM
#1
Thread Starter
Lively Member
Hi all,
Sorry for asking so many questions but I think this should be the last for now 
Is there anyway that I can write a code in VB6 to compact some Access 2.0 Database files (mdb)?
Thanks!!
-
Oct 15th, 2000, 09:22 PM
#2
You can use the Search facility of this forum to find the answers to many of your questions (like this one), but here it is anyhow. This example also repairs the database.
DBEngine.RepairDatabase "MyDB.MDB"
DBEngine.CompactDatabase "MyDB.MDB"
, App.Path & "compact.bak"
Kill "MyDB.MDB"
Name App.Path & "compact.bak" As "MyDB.MDB"
-
Oct 15th, 2000, 11:23 PM
#3
Thread Starter
Lively Member
Hi Martinliss,
Thanks for the reply.
For your method given, after compacting the databases, am I still able to open it with Access 2.0? (Cos I have both Access 97 and Acess 2.0 installed).
Thanks!!
-
Oct 16th, 2000, 08:50 AM
#4
Sure. It's no different than compacting and/or reparing the database from within Access.
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
|