I want to change my .mdb Database password by C# code. I am using following code for this but some error comes. So please help me.
IErrorInfo.GetDescription failed with E_FAIL(0x80004005). This error comes.
Code:
OleDbConnection cnn1 = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + ";Jet OLEDB:Database Password=" + pwd + ";Mode=Share Exclusive");
OleDbCommand cmd1 = new OleDbCommand();
cnn1.Open();
cmd1.Connection = cnn1;
string Query="ALTER DATABASE PASSWORD <newPassword> " + pwd + "";
cmd1.CommandText = Query;
blnSuccess = cmd1.ExecuteNonQuery();