Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 01:07 PM
Wayne...
Guest
 
Posts: n/a
Default 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...


  #2  
Old July 19th, 2005, 01:07 PM
Ray at
Guest
 
Posts: n/a
Default Re: how do I reference to an acces dtabase out side my WWW folder?

You can use:

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

Ray at home

"Wayne..." <wayne@secretwebdesign.com> wrote in message
news:409781d1@212.67.96.135...[color=blue]
> 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[/color]
the[color=blue]
> 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[/color]
wailing[color=blue]
> and gnashing of teeth lol
>
> Wayne...
>
>[/color]


  #3  
Old July 19th, 2005, 01:07 PM
Ken Schaefer
Guest
 
Posts: n/a
Default Re: how do I reference to an acces dtabase out side my WWW folder?

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..." <wayne@secretwebdesign.com> wrote in message
news:409781d1@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...
:
:


  #4  
Old July 19th, 2005, 01:07 PM
Wayne...
Guest
 
Posts: n/a
Default Re: how do I reference to an acces dtabase out side my WWW folder?

thanks guys thats probably saved me a good bit of messing around by trial
and error. I owe you both one;)

Wayne...

"Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
news:u%23SG16cMEHA.556@tk2msftngp13.phx.gbl...[color=blue]
> 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..." <wayne@secretwebdesign.com> wrote in message
> news:409781d1@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[/color]
referenceing[color=blue]
> : 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...
> :
> :
>
>[/color]


  #5  
Old July 19th, 2005, 01:07 PM
Jeff Cochran
Guest
 
Posts: n/a
Default Re: how do I reference to an acces dtabase out side my WWW folder?

On Tue, 4 May 2004 12:42:49 +0100, "Wayne..."
<wayne@secretwebdesign.com> wrote:
[color=blue]
>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)[/color]

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
  #6  
Old July 19th, 2005, 01:08 PM
Ray at
Guest
 
Posts: n/a
Default Re: how do I reference to an acces dtabase out side my WWW folder?

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" <jcochran.nospam@naplesgov.com> wrote in message
news:409a5ff5.196496717@msnews.microsoft.com...
[color=blue]
> 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.[/color]


  #7  
Old July 19th, 2005, 01:08 PM
Bob Barrows [MVP]
Guest
 
Posts: n/a
Default Re: how do I reference to an acces dtabase out side my WWW folder?

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:[color=blue]
> 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" <jcochran.nospam@naplesgov.com> wrote in message
> news:409a5ff5.196496717@msnews.microsoft.com...
>[color=green]
>> 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.[/color][/color]



  #8  
Old July 19th, 2005, 01:08 PM
Ray at
Guest
 
Posts: n/a
Default Re: how do I reference to an acces dtabase out side my WWW folder?

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]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:ekpZnbqMEHA.1340@TK2MSFTNGP12.phx.gbl...[color=blue]
> 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:[color=green]
> > 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.[/color][/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles