how to "unprotect" access 97 database

I have a access 97 database that is a data source for a second access database.

The second access database has been converted to 2007 format.

The first one wasnt. (oops)


I can not convert the access database to 2007 format while the password is active.

but access 2007 can not "deactivate" the password.

Mind you this isnt the user/password pairs, this is just a single password that the access asks for whenever you connect to the database.

short of trying to uninstall access 2007, installing access 97, then reversing the trend, how to I convert the database?
LVL 8
Rance_HallAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You can use DAO to remove the password:

Function RemoveDBPassword(DBPath as string, CurrentPassword As String)
Dim dbs As dao.Database

Set dbs = dao.OpenDatabase(DBPath, True, False, ";pwd=" & CurrentPassword)

dbs.NewPassword CurrentPassword, ""

dbs.Close
Set dbs = Nothing
End Function

Copy this into a Standard Module in any Access database, then call it like this from the Immediate window:

?RemoveDBPassword("Full path to your db", "YourPassword")


0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rance_HallAuthor Commented:
The above function gave me a compile error:

Expected:=

so I figured that it was the line that set the new password, so I modified the code to be this:

Function RemoveDBPassword(DBPath As String, CurrentPassword As String)
Dim dbs As dao.Database
Dim retval As Variant

Set dbs = dao.OpenDatabase(DBPath, True, False, ";pwd=" & CurrentPassword)

retval = dbs.NewPassword(CurrentPassword, "")

dbs.Close
Set dbs = Nothing
End Function

This doesn't fix the problem, wonder what I missed?  according to the documentation, this is perfect, so im not sure why it doesnt work.
0
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
While the NewPassword call might return a value, you don't have to catch it ... the code worked perfectly on my machine, however this was on a 2003 database. You might need to run this from a different environment, with a reference set to the DAO 3.5 library, since that's what 97 used.
0
Rance_HallAuthor Commented:
Thanks for the hint, I finally got it.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.