Solved

Changing Access password with ADO

Posted on 1998-10-05
9
227 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to Add / Edit Windows Menu 4 67
Protecting vb6 & .Net code Obfuscation 18 151
How to read File Date Created using VB6 8 51
Dinamic report to Crosstab query 9 33
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

839 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