Print Page | Close Window

Moving an Access DB

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=9285
Printed Date: 01 April 2026 at 1:00am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Moving an Access DB
Posted By: Garrett1226
Subject: Moving an Access DB
Date Posted: 27 January 2004 at 1:14pm

Could someone explain the best way to establish a DSN-less connection to an Access DB outside of the web root where the ASP file referencing it is located?  I have dug through most of the tutorials and forum postings but can't seem to make the connection.  Here is the code I have:

Dim adoCon, dbPath
  dbPath = "c:\test\cropleads.mdb"
  Set adoCon = Server.CreateObject("ADODB.Connection")
  adoCon.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & dbPath

If I change the dbPath variable to the DB withing the ASP file's folder it works.

Thanks,

 



-------------
Garrett Miller



Replies:
Posted By: Garrett1226
Date Posted: 27 January 2004 at 1:54pm
Nevermind,  was the simplest of mistakes.  When I copied over the original DB to a new folder somehow a password was placed on the DB.  As soon as I cleared the password everthing worked fine.

-------------
Garrett Miller



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net