ADO Connection wants password?

D

David Portwood

My first attempt at using ADO (versus DAO).

A form opens and creates a connection. The connection wants my password. I
hardcoded it as a param to the connection.open method and got the
connection. However, this is a multi-user app. How do I set the password in
the connection.open method for an arbitrary user?
 
S

Scott McDaniel

David Portwood said:
My first attempt at using ADO (versus DAO).

A form opens and creates a connection. The connection wants my password. I
hardcoded it as a param to the connection.open method and got the
connection. However, this is a multi-user app. How do I set the password
in the connection.open method for an arbitrary user?

Not sure what you mean by "arbitrary user" ... do all users use the same
login for the database, or does each user have their own? If all users use
the same one, then hardcoding it will work (at least until the password is
changed). If each user has their own, then you might want to capture their
password on login, store it in a table and then use it as needed for the
connection.
 
D

David Portwood

Not sure what you mean by "arbitrary user" ... do all users use the same
login for the database, or does each user have their own? If all users use
the same one, then hardcoding it will work (at least until the password is
changed).

I'm talking about the password to enter a secured database. Each user has
his own password which is set by the user himself from the Access menu:
Tools\Security\User And Group Accounts\Change Logon Password tab.
If each user has their own, then you might want to capture their password
on login, store it in a table and then use it as needed for the connection.

How do I capture their password on login? Is that possible? Am I
misunderstanding you?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top