PDA

View Full Version : Opening accdb with password


davherb
03-28-2008, 10:29 AM
I am able to open an Access 2007 database without the password but not with a password.

e.g.
strCon = ("Provider= Microsoft.ACE.OLEDB.12.0;Jet OLEDB:Database Password=thePW;Data Source=" & Server.MapPath("\_database\CALENDAR.accdb"))

Checked KB but did not find an example for encrpted with password Access 2007 database.

Dave

wisemx
03-28-2008, 11:23 AM
You using classic ASP or asp.net ?

wisemx
03-29-2008, 01:08 AM
OK, I'moff to get ashower, but for now please beta test this:
http://search.live.com/macros/wisemx/aspnet/

I'm designing that for ASP.NET searches but it will also comb coding sites for classic asp.
Just drop a few search terms in and see if you pull up some examples.
If not I'll post some code for you in a bit. http://community.discountasp.net/emoticons/wink.gif

As an example, it found this:
http://www.codeproject.com/KB/database/accessdb.aspx

bruce
03-29-2008, 01:23 AM
This is a known issue with Access 2007.


Access is designed to be used as a desktop database. When you password protect the DB, Access 2k7 creates some sort of encryption key that is stored on the currently logged on user's profile. This is no problem when you use Access on your desktop because you always have a valid profile.


When you try to use this on the web application, the database driver will automatically try to create the temporary key in the ASPNET user's profile which DOES NOT exists. As of currently, I don't think anyone figured out how to tell the database driver to use the machine keystore.


Long story short, you can't use password protection w/ Access 2007 when using it for web application.


I recommend upgrading to SQL.


Bruce

DiscountASP.NET
www.DiscountASP.NET (http://www.DiscountASP.NET)

wisemx
03-29-2008, 03:06 AM
I had no idea 2007 did that, thanks bro.
For Siemens I did exactly what was discussed here for employees who travelled.
Since then I've only used Access 2007 to open previous Access DBs.
Having done so much with them this kinda shocked me. http://community.discountasp.net/emoticons/tongue.gif
Thanks

davherb
03-29-2008, 12:59 PM
classic.

I am moving an application from another web host.

Works fine without a password, but it seems like it ought to be password protected.

Dave