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

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Wayne...

    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.m db ? {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...


  • Ray at

    #2
    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@secretwe bdesign.com> wrote in message
    news:409781d1@2 12.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.m db ? {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]


    Comment

    • Ken Schaefer

      #3
      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@secretwe bdesign.com> wrote in message
      news:409781d1@2 12.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.m db ? {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...
      :
      :


      Comment

      • Wayne...

        #4
        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@THIS adOpenStatic.co m> wrote in message
        news:u%23SG16cM EHA.556@tk2msft ngp13.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@secretwe bdesign.com> wrote in message
        > news:409781d1@2 12.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.m db ? {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]


        Comment

        • Jeff Cochran

          #5
          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@secretwe bdesign.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.m db ? {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

          Comment

          • Ray at

            #6
            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.nospa m@naplesgov.com > wrote in message
            news:409a5ff5.1 96496717@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]


            Comment

            • Bob Barrows [MVP]

              #7
              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.nospa m@naplesgov.com > wrote in message
              > news:409a5ff5.1 96496717@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]



              Comment

              • Ray at

                #8
                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@NOyah oo.SPAMcom> wrote in message
                news:ekpZnbqMEH A.1340@TK2MSFTN GP12.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]


                Comment

                Working...