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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO and MS Access Database Password

Status
Not open for further replies.

cpmasesa

Programmer
Oct 24, 2002
78
AE
Hello,

I just finished an app that i want to deliver to the client.

I want the database to be password protected (MS ACcess 2K)

I set the password in access, no problem.

In Delphi when i set the password in the ADOConnection dialog and test the connection, i get a message 'workgroup onformation file is missing or opened exclusively by anothe ruser'. Hwne i try to compile and run the app i get 'not a valid password'

I notice that the connection dialog defaults to a user 'admin', but when setting the database password in access there is no mention of 'username'

What am i doing wrong??

TIA,

Clemens
 
Not done Access 2k for some time, but if you password protected the Access Database - it is not stored in the Database itself. Its stored (by default) in the System database. The default name is "system.mdw".

Not sure about the exact form the connection string but will be something like this...

Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\somepath\mydatabase.mdb;Persist Security Info=False;Jet OLEDB:System database=C:\Program Files\Common Files\System\System.mdw;Jet OLEDB:Database Password=pass;

So basically, you will have to ship the system database along with the Access database and app and set the appropriate connection string.

Opp.

 
Opp,

Thanks for the suggestion. I will try it once i get back to the office later today.

The help file for Access 2k says that the password IS stored with the database! I remember reading this adn being suprised as to why it doesnot then work :(

When i send the system.mdw, what happens to any passwords for other databases that the client might have? Is there like a merge procedure??

Thanks

cpmasesa
 
As I say.. its been a while sonce I have done any Access Databases. But AFAIK - given that the default system database is system.mdw - then any unless you specify a seperate (up-protected) system database, all other databases will by defaul inherit the security restrictions in place.

If I am correct in this - then it may be worth while creating a new system database for those that need it (your app ?) and ship this with your app. It then allows users to access other databases without restriction.

You may want to post in the Access forums for more information and to check what Ive said.

Opp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top