Accessing password-protected ACCESS database

How do I read entries in a password protected ACCESS database file?  How do I pass the password to open it using VB?
wsanchezAsked:
Who is Participating?
 
indranilConnect With a Mentor Commented:
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
 
watyCommented:
Depending if you use ODBC, or DAO
0
 
wsanchezAuthor Commented:
thanks.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
vincerubusCommented:
What if I do no know the UID and PWD ? ? ?

Vince
0
 
indranilCommented:
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
 
PIBMCommented:
What if you don't have a DSN ?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.