Print Page | Close Window

Moving MDB File

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums
Forum Description: Support forum for Web Wiz Forums application.
URL: https://forums.webwiz.net/forum_posts.asp?TID=5763
Printed Date: 03 April 2026 at 5:10am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Moving MDB File
Posted By: Tegwin
Subject: Moving MDB File
Date Posted: 15 September 2003 at 1:57pm

I have just published my forum up to my ISP and all is working ok. Now I am trying to move my database away into a private area so that it cannot be accessed by anyone.  I am having a few problems doing this

My directory structure is like this (well that is how I see it in FTP)

/

/domainname

/domainname/htdocs

/domainname/logfiles

/domainname/private.

I have put the forums directory under the htdocs folder, as this is the default location. Basically I want to copy my database to the /domainname/private folder. I have used the following line in the common.asp file under /domainname/htdocs/forum/admin

'--------------------- Set the path and name of the database ------------------------------------------------------------ --------------------

'Virtual path to database
strDbPathAndName = Server.MapPath("domainname/private")  'This is the path of the database from this files location on the server

'Physical path to database
'strDbPathAndName = "" 'Use this if you use the physical server path, eg:- C:\Inetpub\private\WebWizForum.mdb

for some reason when I do this, I am getting a page cannot be displayed error.

I am sure I am doing it wrong... can someone help and let me know what I should be changing

Thanks


 




Replies:
Posted By: michael
Date Posted: 15 September 2003 at 3:16pm

if your forum is in
/domainname/htdocs/forum
and your database is in
/domainname/private
you need to put
Server.MapPath("././private")
or even better use the physical filename, get rid of mappath i get always confused by it.



-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Tegwin
Date Posted: 15 September 2003 at 3:27pm

Thanks. yes I have tried this and I am still getting the same problems. I am getting a page could not be displayed. For the admin directory I guess I need one more ./ as it is one more folder back.

 



-------------
If you dont want my peaches, dont shake my tree


Posted By: God_Struth
Date Posted: 15 September 2003 at 5:43pm
Shouldn't it be ../ instead of just ./


So the admin line would be ../../../private
The Forum line would be ../../private


Well, it works for me!


Posted By: Tegwin
Date Posted: 16 September 2003 at 1:19am

thanks god_struth..

I think I am going to try and find out from my ISP what the full path is of that folder. this is no good I just keep getting the same problems. I have tried it locally on my server and get the same errors.

It may also be that the folder does not have write permissions

 



-------------
If you dont want my peaches, dont shake my tree


Posted By: Tegwin
Date Posted: 17 September 2003 at 10:41am

My Isp has given me a UNC name to my private directory in the form of

file://\\nas02\n\01\sitename\private - \\nas02\n\01\sitename\private .

I have tried to add this into strDbPathAndName = Server.MapPath(" file://nas02/n/01/sitename/private - \\nas02\n\01\sitename\private ") but that does not seem to work. I have tried it with and without the trailling slash. DOes anyone know if this the right thing to be doing here or should I do this another way.

 



-------------
If you dont want my peaches, dont shake my tree


Posted By: michael
Date Posted: 17 September 2003 at 2:19pm
I hate when ISP's do that, Thus it should work in the form:
strDBPathAndName = " file://\\nas\n\01\sitename\private - \\nas\n\01\sitename\private "
without using the Server.MapPath.


-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: Tegwin
Date Posted: 18 September 2003 at 5:40am

Originally posted by michael michael wrote:

I hate when ISP's do that, Thus it should work in the form:
strDBPathAndName = " file://\\nas\n\01\sitename\private - \\nas\n\01\sitename\private "
without using the Server.MapPath.

 

Thanks Michael. I have tried this as you say and it still does not work. I have tried strDBPathAndName = " file://nas/n/01/sitename/private - \\nas\n\01\sitename\private \wwforums.mdb" and it still does not seem to work. I really would have liked the db moved for security purposes but it still gives me a 500 error, no matter what I do. Is there anyone who has moved a database to another location similar to this that has got it working. ?

I guess if I cant get it working then I will just rename the database and hope for the best

 



-------------
If you dont want my peaches, dont shake my tree


Posted By: God_Struth
Date Posted: 18 September 2003 at 6:03pm
Hve a look here : http://www.able-consulting.com/ADO_Conn.htm - Connection Strings

If you can't find a string there that suits your needs your in sh*t creek


Posted By: Phat
Date Posted: 18 September 2003 at 6:10pm

What's the actual error. In your first post you said you were getting a page cannot be displayed error.  Rather that a can not connect to database error.

Can you post the actual error. I have moved my database no problem.

James



-------------
http://buildit.sitesell.com/sitebuildithome.html - Get a website that sells


Posted By: Tegwin
Date Posted: 19 September 2003 at 1:38am

Thanks to all who have helped. It is working well now. I had the name of the path wrong. Guess that what happens when you are in a rush to do things. I went back into my email from my ISP and copied the srtring again.. and boom up it came..

EmbarrassedEmbarrassedEmbarrassedEmbarrassed



-------------
If you dont want my peaches, dont shake my tree



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