Solved

Accessing password-protected ACCESS database

Posted on 1998-09-10
6
129 Views
Last Modified: 2011-09-20
How do I read entries in a password protected ACCESS database file?  How do I pass the password to open it using VB?
0
Comment
Question by:wsanchez
6 Comments
 

Accepted Solution

by:
indranil earned 20 total points
ID: 1434021
Assuming you are using the Data object in your form and ODBC, the database can be accessed by passing the connect string in the Connect property of thae Data object. This looks somewhat like -
'DBQ=c:\access\test.mdb;DSN=mydb;UID=indranil;PWD=yahoo'
The string should match the entry you have used while registering with ODBC.
0
 
LVL 14

Expert Comment

by:waty
ID: 1434022
Depending if you use ODBC, or DAO
0
 

Author Comment

by:wsanchez
ID: 1434023
thanks.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Expert Comment

by:vincerubus
ID: 1434024
What if I do no know the UID and PWD ? ? ?

Vince
0
 

Expert Comment

by:indranil
ID: 1434025
You do not have any choice then. Normally the access files do not have a password protection and your best bet is to try -
UID=;PWD=;
and hope for the best.
0
 

Expert Comment

by:PIBM
ID: 2494695
What if you don't have a DSN ?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now