Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: Can't open Access database using ASP


Message #1 by "Chris Nail" <shoultsc@p...> on Wed, 11 Jul 2001 20:27:03
I'm using Microsoft Access 2002 (and occasionally Access 2000).

I created a database with several tables, and set a database password by 

going to Tools... Security... Set Database Password.  I haven't played 

with any other security settings.

When I click to open my Access database, it prompts me for a password and 

opens fine.  I obviously have the right password.  However, I'm not able 

to write a connection string for my ASP page that works.  If I remove the 

database password, everything works perfectly.

Here's what I'm using:



dbstring="Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath

("myaccessdb.mdb") & ";UID=Admin;PASSWORD=mypass"

Set cn=Server.CreateObject("ADODB.Connection")

cn.ConnectionString=dbstring

cn.Open



The error message is always:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

[Microsoft][ODBC Microsoft Access Driver] Not a valid password. 



I've tried every variation of "UID" and "PASSWORD" I can think of  (IE: 

UID and PWD, USERID and PASSWORD, etc.)  Nothing has worked so far.



What am I missing?

Thanks for your help!



Chris
Message #2 by "Ken Schaefer" <ken@a...> on Thu, 12 Jul 2001 10:30:54 +1000
strConnect = _

    "Provider=Microsoft.Jet.OLEDB.4.0;" & _

    "Data Source=c:\databases\db1.mdb;" & _

    "Jet OLEDB:Database Password=PasswordHere;"



Cheers

Ken

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

----- Original Message -----

From: "Chris Nail" <shoultsc@p...>

To: "ASP Database Setup" <asp_database_setup@p...>

Sent: Wednesday, July 11, 2001 8:27 PM

Subject: [asp_database_setup] Can't open Access database using ASP





: I'm using Microsoft Access 2002 (and occasionally Access 2000).

: I created a database with several tables, and set a database password by

: going to Tools... Security... Set Database Password.  I haven't played

: with any other security settings.

: When I click to open my Access database, it prompts me for a password and

: opens fine.  I obviously have the right password.  However, I'm not able

: to write a connection string for my ASP page that works.  If I remove the

: database password, everything works perfectly.

: Here's what I'm using:






  Return to Index