473,396 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how do I reference to an acces dtabase out side my WWW folder?

on my hosting acount I have 3 folders that were set up by default:
DB
LOGS
WWW
now I understand what each if for obviously, but can i reference back to the
databases location outside the www folder from a file using
..../DB/database_name.mdb ? {asssuming of course the file I am referenceing
from is in the main WWW folder)
I just want to make surfe I get this bit right and stop any weeping wailing
and gnashing of teeth lol

Wayne...
Jul 19 '05 #1
7 1388
You can use:

Server.MapPath("../DB/database.mdb")

Ray at home

"Wayne..." <wa***@secretwebdesign.com> wrote in message
news:40******@212.67.96.135...
on my hosting acount I have 3 folders that were set up by default:
DB
LOGS
WWW
now I understand what each if for obviously, but can i reference back to the databases location outside the www folder from a file using
.../DB/database_name.mdb ? {asssuming of course the file I am referenceing
from is in the main WWW folder)
I just want to make surfe I get this bit right and stop any weeping wailing and gnashing of teeth lol

Wayne...

Jul 19 '05 #2
If you have a root folder, and both DB and WWW are off that root folder,
then you can do a little lateral coding to work out the necessary path.

root
|- DB
|- Logs
|- WWW

Put a page into WWW, and use Server.Mappath() to get the path to WWW. Then
you can lop off WWW and substitute DB.

Cheers
Ken

"Wayne..." <wa***@secretwebdesign.com> wrote in message
news:40******@212.67.96.135...
: on my hosting acount I have 3 folders that were set up by default:
: DB
: LOGS
: WWW
: now I understand what each if for obviously, but can i reference back to
the
: databases location outside the www folder from a file using
: .../DB/database_name.mdb ? {asssuming of course the file I am referenceing
: from is in the main WWW folder)
: I just want to make surfe I get this bit right and stop any weeping
wailing
: and gnashing of teeth lol
:
: Wayne...
:
:
Jul 19 '05 #3
thanks guys thats probably saved me a good bit of messing around by trial
and error. I owe you both one;)

Wayne...

"Ken Schaefer" <ke*******@THISadOpenStatic.com> wrote in message
news:u%***************@tk2msftngp13.phx.gbl...
If you have a root folder, and both DB and WWW are off that root folder,
then you can do a little lateral coding to work out the necessary path.

root
|- DB
|- Logs
|- WWW

Put a page into WWW, and use Server.Mappath() to get the path to WWW. Then
you can lop off WWW and substitute DB.

Cheers
Ken

"Wayne..." <wa***@secretwebdesign.com> wrote in message
news:40******@212.67.96.135...
: on my hosting acount I have 3 folders that were set up by default:
: DB
: LOGS
: WWW
: now I understand what each if for obviously, but can i reference back to
the
: databases location outside the www folder from a file using
: .../DB/database_name.mdb ? {asssuming of course the file I am referenceing : from is in the main WWW folder)
: I just want to make surfe I get this bit right and stop any weeping
wailing
: and gnashing of teeth lol
:
: Wayne...
:
:

Jul 19 '05 #4
On Tue, 4 May 2004 12:42:49 +0100, "Wayne..."
<wa***@secretwebdesign.com> wrote:
on my hosting acount I have 3 folders that were set up by default:
DB
LOGS
WWW
now I understand what each if for obviously, but can i reference back to the
databases location outside the www folder from a file using
.../DB/database_name.mdb ? {asssuming of course the file I am referenceing
from is in the main WWW folder)


I personally prefer using the full path to the MDB file, and putting
the connection string in a separate ASP file used in an include. In
your case, a Server.MapPath may be required due to the hosting company
not providing a direct path.

Jeff
Jul 19 '05 #5
I also use full paths instead of server.MapPath. I prefer that. I guess if
for no other reason its one or two fewer instructions to process.

Ray at work

"Jeff Cochran" <jc*************@naplesgov.com> wrote in message
news:40****************@msnews.microsoft.com...
I personally prefer using the full path to the MDB file, and putting
the connection string in a separate ASP file used in an include.

Jul 19 '05 #6
I prefer using MapPath because inetpub is on the c drive of my pc, the d
drive of our development server, and the e drive of our production server.

Bob

Ray at <%=sLocation%> [MVP] wrote:
I also use full paths instead of server.MapPath. I prefer that. I
guess if for no other reason its one or two fewer instructions to
process.

Ray at work

"Jeff Cochran" <jc*************@naplesgov.com> wrote in message
news:40****************@msnews.microsoft.com...
I personally prefer using the full path to the MDB file, and putting
the connection string in a separate ASP file used in an include.


Jul 19 '05 #7
Somewhere along the way I developed the habit of putting inetpub on D and I
force myself to be consistent with that. But, that does make my things a
bit unportable. And when I upgraded my intranet server from NT to 2000
(dual boot, not upgrade), I put W2K on drive E. It seems odd to have an OS
drive with a greater alpha value than a data drive, but oh well.

Ray at work

"Bob Barrows [MVP]" <re******@NOyahoo.SPAMcom> wrote in message
news:ek**************@TK2MSFTNGP12.phx.gbl...
I prefer using MapPath because inetpub is on the c drive of my pc, the d
drive of our development server, and the e drive of our production server.

Bob

Ray at <%=sLocation%> [MVP] wrote:
I also use full paths instead of server.MapPath. I prefer that. I
guess if for no other reason its one or two fewer instructions to
process.

Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Shannon | last post by:
Hi, all -- this is a weird question that does not really have to do with javascript, but I used to spend a lot of time here, and am hoping someone might be able to help... I am trying to...
6
by: Mark Anderson | last post by:
I have code to develop result page links (like a search engine) for some results being passed from a database where I've no server-sdide acces - thus JS. The code is below and works fine except...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
1
by: Adam Getchell | last post by:
I'd like to reference the SQLHelper.dll from the Microsoft Application Data Block. I've created an installer which installs it into the GAC. From reading articles, I've noted that the GAC...
3
by: frederik | last post by:
Hi The website have to show subdirectories on a network drive. I use the following code: string directories; directories=Directory.GetDirectories(_Path); ....
7
by: Samuel | last post by:
Hi, I am building a page that makes use of user control as a templating technique. The following is that I have in mind and it is actually working: Root/ -- login.aspx -- login.aspx.vb --...
11
by: Just Me | last post by:
I have a solution containing many usercontrol projects. When I wish to reference a usercontrol in another project I can select either the project or the assembly. Does it make a difference which...
8
by: wASP | last post by:
Hi, I'm having a problem referencing the elements within an object after a method of that object (a member function) has been activated with an onsubmit handler: - - - - - - - - ...
11
by: =?Utf-8?B?UGFycm90?= | last post by:
I get an error when trying to add a reference to a DLL program from a Realia COBOL program that is 32 bit. The error message says "Please make sure the file is accessible and that it is a valid...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.