AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Wednesday, September 13, 2006

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