Solved

Changing Access password with ADO

Posted on 1998-10-05
9
229 Views
Last Modified: 2013-12-25
I'm using ADO 2.0 to connect to an Access 97 database (with security) through an ODBC System DSN. It's working fine.

I would like to know how to change a user's password with ADO.

Is it possible, if so, how do I do that ?
0
Comment
Question by:mxclouti
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 3

Expert Comment

by:vmano
ID: 1496675
ADO Data Control has Password Property which Sets the password used during creation of an ADO Recordset object.

Syntax - object.Password [= string]

object - An object expression that evaluates to an object... for example an ADO data control
string - Sets the password for the user named in the UserName property.

This property setting is write-only — it may only be provided in code, it cannot be read back from the Password property.

let me know if this helps
vmano
0
 

Author Comment

by:mxclouti
ID: 1496676
I'm not using the ADO Data Control and I don't want to.

I'm using Microsoft ActiveX Data Objects 2.0 Library (MSADO15.DLL)

I'm connecting to my Access Database (with security) this way:

Dim conADO As ADODB.Connection
Set conADO = New ADODB.Connection
conADO.Open "DSN=WMS_REL;UID=mxclouti;PWD=mxclouti;"

where WMS_REL is an ODBC SYSTEM DSN pointing to my Access Database WMS_REL.MDB. I' m also using the system database WMS_REL.MDW for the security.

Once the user is connected to the database, I want him to be able to change his password:

Old password: xxxxx
New password: xxxxx
Verification: xxxxx
(OK) (CANCEL)

I'm waiting for your answer.

Thanks
0
 

Author Comment

by:mxclouti
ID: 1496677
Now I know that:

Users and passwords are included in the table msysAccounts of WMS_REL.MDW. Fieldnames are FGroupe, Name, Password and SID.

So, it's very easy to connect to WMS_REL.MDW with ADO and change the password.

But I need to provide and encrypted password.

The question is, how do I encrypt the new password before updating the field Password where Name = "mxclouti".

Thanks in advance.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:vmano
ID: 1496678
check out the EE article
http://experts-exchange.com/topics/comp/lang/visualbasic/Q.10086508

about "making a password" answered by Waty.
0
 

Author Comment

by:mxclouti
ID: 1496679
Article http://experts-exchange.com/topics/comp/lang/visualbasic/Q.10086508 shows how to encrypt a password. Ok

But, is it the same encryption algorithm that is used to encrypt the password field in msysAccounts in my .MDW file.

Thanks.

0
 
LVL 3

Expert Comment

by:vmano
ID: 1496680
I am not sure.
0
 

Author Comment

by:mxclouti
ID: 1496681
Is it possible to change a password in the table msysAccounts of a .MDW file ? The field Password is an encrypted field.
0
 
LVL 3

Accepted Solution

by:
altena earned 150 total points
ID: 1496682
The answer to the original question:
"how to change a user's password with ADO"

No, this is not a feature of ADO. And the path this question
has taken is a hack. As soon as you get it to work, your
application will break whenever a new version of access is
installed. (if you get it to work in the first place)

The answer to the question:
"How do I allow the user to change the password?"

For access databases, use DAO and call User.Newpassword
(but you knew this, off course)

The changing of passwords is not standardized, so you have
to use the "standard method" of the database you are using.
With Access databases, that means DAO.

    Good Luck

0
 

Author Comment

by:mxclouti
ID: 1496683
I'll be using USER.NEWPASSWORD then.

Thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

726 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