Hello!
I really want to know how to change password of an MS Access database through OLEDb. If I have db1.mdb, my connection string would be:
gstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db1.mdb;Jet OLEDB:Registry Path=;Jet OLEDB
atabase Password=;Jet OLEDB:New Database Password=TEST;"
cnn.open gstr
cnn.close
this did not work. though i dont have any error but when i open db1.mdb, it did not apply my database password. Another way of doing it is:
gstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db1.mdb;Jet OLEDB:Registry Path=;Jet OLEDB
atabase Password=;"
cnn.open gstr
cnn.Properties("Jet OLEDB:New Database Password"
="test"
cnn.close
I got an error message Run-time error '-2147217887 (80040e21)':Read-only property value was not set.
Please help me.
I really want to know how to change password of an MS Access database through OLEDb. If I have db1.mdb, my connection string would be:
gstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db1.mdb;Jet OLEDB:Registry Path=;Jet OLEDB
cnn.open gstr
cnn.close
this did not work. though i dont have any error but when i open db1.mdb, it did not apply my database password. Another way of doing it is:
gstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db1.mdb;Jet OLEDB:Registry Path=;Jet OLEDB
cnn.open gstr
cnn.Properties("Jet OLEDB:New Database Password"
cnn.close
I got an error message Run-time error '-2147217887 (80040e21)':Read-only property value was not set.
Please help me.