PDA

Click to See Complete Forum and Search --> : Compact Database with PAssword Problem


Spawny
Aug 18th, 1999, 11:45 AM
Hi I have a database that I open with a password. There is no problem there but the minute i want to compact the database with a password it cant read the password. The passwords are the same from what I can see. Here is the code for opendatabase:

Set pDatabase = pWorkspace.OpenDataBase(App.Path & "\" & pDatabasName, False, False, ";PWD=password")

and here is the code i use to compact the database:

DBEngine.CompactDatabase App.Path & "\client.mdb", App.Path & "\client1.mdb", , ";PWD=password"

Now the passwords are exactly the same but compact database shows an error. If i dont have a password all the code works fine but I need to have a password on the database. Any ideas would be appreciated. Thanks in advance.

Mike


[This message has been edited by Spawny (edited 08-22-1999).]

Spawny
Aug 21st, 1999, 11:13 AM
Come on Guys/Gals.... Doesn't anyone know the answer? Please Reply

JHausmann
Aug 22nd, 1999, 01:41 AM
I dunno if it's a typo but it looks as though you're missing a comma in the string.

Format is supposed to be:

olddb,newdb,locale,options,password

Spawny
Aug 22nd, 1999, 03:48 PM
Thanks JHausmann, I can't believe it was something that simple. Thanks once again. It was the missing comma.

Mike