Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resetting a database Password after compacting

Status
Not open for further replies.

33216CLC

Programmer
Aug 17, 2000
173
BS
Hi,

I have been searching for months for some code to reset the password to an Access mdb file that is used as the backend database for my software. I would like to compact the database everytime the program is opened. I have the code for compacting, but when I use it, I loose to password to the database and am able to open it without having to log in.

May I please have some CODE to do this, PLEASE????

Thanks
 
hi,

very easy solution, requires a reference though:

1. reference the access object library
2. use

dbengine.compactdatabase "source", "dest", , , "pwd"

to compact it

hth
CPUburn
 
CPUburn,

I'm sorry, but that is the code I used to compact the datadase. It compacts it, but removes the password. After the compact I open the database and I am not prompted for a Password - so somehow, in the process it was deleted.

Thank you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top