Changes the password of an existing user account or Microsoft Jet database (Microsoft Jet workspaces only).
Syntax
VOIDNewPassword(LPCTSTR pstrOld,
LPCTSTR pstrNew);
Parameters
Type | Example | Description |
LPCTSTR | pstrOld | A pointer to a string that is the current setting of the Password property of the User or Microsoft Jet 3.x Database object. |
LPCTSTR | pstrNew | A pointer to a string that is the new setting of the Password property of the User or Microsoft Jet 3.x Database object. |
Remarks
The oldpassword and newpassword strings can be up to 14 characters long and can include any characters except the ASCII character 0 (null). To clear the password, use a zero-length string ("") for new password. Passwords are case-sensitive.
Usage
#include <afxole.h>
#include <dbdao.h>
CdbUser us;
...
us.NewPassword (_T("openSesame"), _T("enterFreely"));