Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Moving MDB File
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Moving MDB File

 Post Reply Post Reply Page  12>
Author
Tegwin View Drop Down
Senior Member
Senior Member


Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tegwin Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.

Back to Top
Tegwin View Drop Down
Senior Member
Senior Member


Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tegwin Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
God_Struth View Drop Down
Senior Member
Senior Member
Avatar

Joined: 07 August 2003
Location: United Kingdom
Status: Offline
Points: 218
Post Options Post Options   Thanks (0) Thanks(0)   Quote God_Struth Quote  Post ReplyReply Direct Link To This Post 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!
Back to Top
Tegwin View Drop Down
Senior Member
Senior Member


Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tegwin Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Tegwin View Drop Down
Senior Member
Senior Member


Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tegwin Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
michael View Drop Down
Senior Member
Senior Member
Avatar

Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
Post Options Post Options   Thanks (0) Thanks(0)   Quote michael Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Tegwin View Drop Down
Senior Member
Senior Member


Joined: 03 September 2003
Location: United Kingdom
Status: Offline
Points: 430
Post Options Post Options   Thanks (0) Thanks(0)   Quote Tegwin Quote  Post ReplyReply Direct Link To This Post 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 = "\\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
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.