Solved

Changing Access password with ADO

Posted on 1998-10-05
9
225 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
  • 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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

816 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

11 Experts available now in Live!

Get 1:1 Help Now