Print Page | Close Window

path to db problem

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=3540
Printed Date: 30 March 2026 at 3:03am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: path to db problem
Posted By: Mike Keeney
Subject: path to db problem
Date Posted: 14 June 2003 at 3:10pm
I'm having a problem getting the path to a database to work correctly.

In order for a DB to be updatable, my WPP has created a DB folder on my site that is write enabled. The virtual path to the directory is silvestri/DB. However, the program itself is located below the WWWROOT directory. (We're on a Win 2003 server).

I can't seem to get the path to the db file correct. If I put the db file into the db folder I can't set the path to it in the Common.asp file. Here's what the line looks like in the Common.asp file:

strDataBasePath = ""&strDBpathCorrection&"LiveSupport.mdb"

However, if I move LiveSupport.mdb to the DB directory and change the path to the db to

strDataBasePath = ""&strDBpathCorrection&"/db/LiveSupport.mdb",

I get an error in the browser that says:

'c:\inetpub\virtual\silvestri\WWWROOT\db\LiveSupport.mdb' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.

/chat/common.asp, line 159

Here are the locations of the relative files & folders.

The virtual path to my DB directory is: silvestri/DB. The Physical path is: C:\inetpub\virtual\silvestri\DB.

The virtual path to the program is:
silvestri/chat.

The physical path is:
C:\inetpub\virtual\silvestri\WWWROOT\chat.

I appreciate your help.

Mike Keeney




Replies:
Posted By: TYSON
Date Posted: 14 June 2003 at 5:53pm
Try Removing Server.Mappath() from the connection string and use your physical path instead.

-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/


Posted By: Bullschmidt
Date Posted: 16 June 2003 at 12:36am

Originally posted by TYSON TYSON wrote:

Try Removing Server.Mappath() from the connection string and use your physical path instead.

That's exactly what I was thinking too even though the original question didn't actually say it was using Server.MapPath().



-------------
J. Paul Schmidt, Freelance ASP Web Developer
www.Bullschmidt.com - www.Bullschmidt.com
Classic ASP Design Tips, ASP Web Database Sample (Freely Downloadable)


Posted By: b_bonnett
Date Posted: 16 June 2003 at 4:05am
..or you could use
strDataBasePath = ""&strDBpathCorrection&"../db/LiveSupport.mdb"

Blair

-------------
Webmaster, http://www.planegallery.net/ - The Plane Gallery
Greetings From Christchurch



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