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

How do I open a database with security setup on it?

Status
Not open for further replies.

Paladyr

Programmer
Apr 22, 2001
508
US
I have a database that whenever you open it, it prompts you for a user name and password. This is a security feature built into Access. Here is the way I am opening the database:

Set dbMaster = OpenDatabase("Networkpath\database97.mdb", , , "User Id=***;Password=***;")
Set dbBackup = OpenDatabase("C:\Backups\Log.mdb", , , "UID=***;PWD=***;")

Am I doing this correctly? Thanks for the help!
 
OK, this is from memory, so may be wrong.

Access security is handled in a separate file. In the ODBC settings for Access you need to provide a System database - this is where all of your UserID/Password information is kept.

I'm not sure how this is set when setting the DSN by hand.

Chaz
 
Okay, I found what you were talking about, found the database on my hard drive, changed it in the ODBC settings, but it still doesn't work :). Thanks for the reply though, didn't know about that before!!! Any other ideas??? Has anyone messed with anything like this before?
 
Found a local expert, you were on the right track. The workgroup file had to be re-created so that I was an admin (person that initially created it is gone!). Thanks for the help!
 
SPOKE TOO SOON!!!!! Still doesn't work. I have set myself up as admin and have verified that I am the owner/administrator of this database, however I get the same darn message when trying to delete tables!!! It doesn't seem to like how I am passing the User name and password. When I was using an ADO recordset it seemed to take my user name and password just fine, but I couldn't figure out a way to delete the table itself. Any ideas?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top