How to change password in c++ dao jet database

  • Thread starter Thread starter Visual 2017 dialog box SetFont not working
  • Start date Start date
V

Visual 2017 dialog box SetFont not working

Guest
I am trying to change my Access 97 database password at runtime. The following code does not work; any suggestions on how to change the password:

CDaoDatabase db;
char* pwd = ";PWD=MyPass";
db.Open("test.mdb", TRUE, FALSE, pwd);
CString strSQL;
strSQL.Format("ALTER DATABASE PASSWORD '%s' 'NewPass'", &pwd[5]);
db.Execute(strSQL);
db.Close();

Continue reading...
 
Back
Top