| Author |
Topic Search Topic Options
|
Tegwin
Senior Member
Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
|
Post Options
Thanks(0)
Quote Reply
Topic: Moving MDB File 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
Edited by Tegwin
|
 |
michael
Senior Member
Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
|
Post Options
Thanks(0)
Quote Reply
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.
|
|
|
 |
Tegwin
Senior Member
Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
God_Struth
Senior Member
Joined: 07 August 2003
Location: United Kingdom
Status: Offline
Points: 218
|
Post Options
Thanks(0)
Quote Reply
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!
|
 |
Tegwin
Senior Member
Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
|
Post Options
Thanks(0)
Quote Reply
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
|
 |
Tegwin
Senior Member
Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
|
Post Options
Thanks(0)
Quote Reply
Posted: 17 September 2003 at 10:41am |
My Isp has given me a UNC name to my private directory in the form of
\\nas02\n\01\sitename\private.
I have tried to add this into strDbPathAndName = Server.MapPath("\\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
|
 |
michael
Senior Member
Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
|
Post Options
Thanks(0)
Quote Reply
Posted: 17 September 2003 at 2:19pm |
I hate when ISP's do that, Thus it should work in the form: strDBPathAndName = " \\nas\n\01\sitename\private" without using the Server.MapPath.
|
|
|
 |
Tegwin
Senior Member
Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
|
Post Options
Thanks(0)
Quote Reply
Posted: 18 September 2003 at 5:40am |
michael wrote:
I hate when ISP's do that, Thus it should work in the form: strDBPathAndName = "\\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 = "\\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
|
 |