How to compact password protected database
Normally you can use DBEngine.CompactDatabase method, but for password protected database you have to specify password:
DBEngine.CompactDatabase "C:\SomePath\MyDatabase.mdb", _
"C:\SomePath\MyDatabase_1.mdb ",,,";pwd=SomePassword".
You can also set a new password for destination database in second argument.
Note that you can not compact database into same destination like in Access, but you can compact to new file name, then delete original and move compacted database to original location
0 Comments:
Post a Comment
<< Home