PDA

Click to See Complete Forum and Search --> : Compacting/Repairing Access


gerard
Sep 2nd, 2000, 08:48 AM
Hi chaps....

I hope this is a quick solution...

Basically I'm trying to write a routine to compact and repair an Access 97 database. My routine works nicely until I add a database "password" on the database in question. I keep getting "invalid password" I know that the password is correct I believe it is my code...as follows...


' Do the compacting via DBEngine
DBEngine.CompactDatabase Location, strTempFile, dbLangGeneral, dbVersion30, ";pwd = ww"


Location and strTempFile are string values i.e "c:\temp\test.mdb"

"ww"s the actual password.

Any ideas anybody!!

Regards

Gerard

gerard
Sep 3rd, 2000, 08:21 AM
Problem solved ...I had spaces between pwd = password, it should be

pwd=password....

As usual its was a little problem.