Solved

Changing Access password with ADO

Posted on 1998-10-05
9
223 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
 
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

760 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

19 Experts available now in Live!

Get 1:1 Help Now