Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passwords to an Access Database!!

Status
Not open for further replies.

CooterBrown

IS-IT--Management
Aug 17, 2001
125
US
Hi
I am trying to access a password protected Access DB with ASP and I want to know if anyone can tell me when I need to put the password in my script? Can someone help? My code is below. thanks in advance!!

CooterBrown


set OBJdbConnection=server.createObject("adodb.connection")
strProvider="driver=Microsoft Access Driver (*.mdb); DBQ=" &_
server.mappath("../database/DB.mdb") & ";"
OBJdbConnection.open StrProvider

set rsList = server.createObject("adodb.recordset")

rslist.activeconnection = OBJdbConnection
rslist.source= "SalutesToAmerica"
rslist.open
 
"Driver={Microsoft Access Driver (*.mdb)};" &_
"Dbq=\DBase\DBase.mdb;" &_
"Uid=Admin;" &_
"Pwd=MyPassword;"

so you would add it to the end of your:

strProvider="driver=Microsoft Access Driver (*.mdb); DBQ=" &_
server.mappath("../database/DB.mdb") & ";" &_
"Uid=Admin;" &_
"Pwd=MyPassword;"
 
strProvider="driver=Microsoft Access Driver (*.mdb); DBQ=" & server.mappath("../database/DB.mdb") & ";" & "Uid=Admin;Pwd=" & cPassword & ";" Jon Hawkins
 
or

OBJdbConnection.open StrProvider,"Admin","Password" Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top