And what about the virtual directory? That's the important one, here is
what I need:
(web paths, not full physical)
My file: /Test/Myfile.aspx
Virtual directory: /Test/VirtualDir/
Code: Server.MapPath("VirtualDir/")
or if you are in a higher directory:
MyFile: /Test/Something/MyFile.aspx
Virutal: /VirtualDir/
Code: Server.MapPath("../../VirtualDir/")
You are probably just getting the virtual path (the one that gets sent into
MapPath) wrong.
Jeremy
"And" <so*****@somedomain.com> wrote in message
news:uG**************@TK2MSFTNGP12.phx.gbl...
This is the full address to my file
C:\Inetpub\wwwroot\Teste29_06_2004\myfile.aspx
and my database full address is (as you were thinking)
c:\inetpub\bd\mydatabase.mdb
PS: tks Jeremy for spend some time with my post
"Jeremy" <th***********@hotmail.com> wrote in message
news:MC*********************@twister.tampabay.rr.c om... Is there a way of accessing my database using virtual directories,
that is, for example if I was using html I could achieve this putting
"..\..\bd\mydatabase.mdb".
I tried to do this using mappath function but with no good result.
Yes, Server.MapPath works. I will post the code if you post the
following:
- The directory that your file resides in
- The full virtual path of your virtual directory (ie /data/bd/ )
I assume the physical path = c:\inetpub\bd\mydatabase.mdb
Jeremy