"Larry Linson" <bo*****@localhost.not> wrote in
news:SDpqe.3372$2K4.946@trnddc08:
"alijsyed" <al******@hotmail.com> wrote
I am trying to change an existing
database password from VB 6.
The database is an MS Access 2000
database if this helps
I'm sure this is possible if you are very knowledgeable of the
internals, but AFAIK there is no documented method... if there were,
what would prevent anyone who wanted to grab your data from doing the
same?
Larry Linson
Microsoft Access MVP
I thought you could do some of this with ADOX?
At the very least, assuming you know the existing Database password (as
opposed to a given user password...), you should be able to do it through
Automation, even in VB...
(reference "Microsoft Access X.0 Object Library" in the VB app), then...
Dim acc as Access.Application
set acc = New Access.Application
acc.OpenCurrentDatabase FullFileNameTo.MDB[, ExclusiveFlag]
acc.CurrentDb.NewPassword oldpwd, newpwd
acc.CloseCurrentDatabase
set acc=nothing
If you actually have a secured database, then you have to either do it
through DAO or with the ADOX library, after logging into the database as
a user in the Admins group or as the database owner.