Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: MS Access Link


Message #1 by "Bill Dodd" <bill.dodd@s...> on Tue, 12 Jun 2001 08:25:42 -0500
Has anyone had any problems opening a linked table in access from an asp?

If so, has anyone found a solution?



Bill



----- 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:

>

> 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 walter@w... on Thu, 12 Jul 2001 15:51:26
Try to leave uid=admin out, like below





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

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

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

cn.ConnectionString=dbstring

cn.Open


  Return to Index