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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access 2k database connection

Status
Not open for further replies.

lordhuh

Programmer
Apr 25, 2000
96
US
i have tryed every possible way i can find to connect with my database. i either get something about cannot open registry key or some permision thing. please can someone show me a corectly formed dsnless connection to a 2k database Karl Pietri
 
set conn = server.createobject("ADODB.Connection")
ConnString = "Driver=Microsoft.Jet.OLEDB.3.51; Data Source=" & Server.MapPath("database.mdb")
conn.open ConnString

Note that this uses OLEDB connections on an Access database without a user name or password.

For a password protected Access database use:

username = "fred"
password = "fredpass"
ConnString = "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("database.mdb") & "; UID=" & username & "; PWD=" & password
Harold Blackorby
hblackorby@scoreinteractive.com
St. Louis, MO
 
You also might want to read the comments of:
ACCESS2000 Connection
thread333-82724 Jon Hawkins
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top