View Full Version : linking to directory
scroots
11-22-2002, 09:08 PM
how can i link to a directory above the root directory to store my user database etc. so that they cannot be downloaded.
thanks
scroots
whammy
11-22-2002, 11:48 PM
sConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Mid(Server.MapPath("\"), 1, InStrRev(Server.MapPath("\"),"\")-1) & "\directoryname\databasename.mdb;" & _
"Persist Security Info=False;"
Conn.Open sConnString
:)
Mhtml
11-22-2002, 11:48 PM
Like having to actually access the drive? Or just the using the host address for it like this...
DBQ="&Server.MapPath(Request.ServerVariables("LOCAL_ADDR")&"/databases/mydb.mdb"&";"
Similar to that..It's just a matter of how you wish to access it, via the host address or via the physical path (I thinK)
The above was using the host address, you can just use..
DBQ="&Server.MapPath(Request.ServerVariables("APPL_PHYSICAL_PATH")&"/databases/mydb.mdb"&";"
to use the physical path..though I have never tried using a physical path so you may run into a few problems.
Mhtml
11-22-2002, 11:50 PM
Just a thought, that may not even work...the physical path code that is. It may try and get it off the users computer. lol :) not sure.
whammy
11-22-2002, 11:50 PM
Hmm, posted at the same time. I know the one I posted works, however, since I use it on brinkster AND at work (when I use access databases), and it works both places.
scroots
11-23-2002, 12:22 PM
thank you all for your help.
scroots
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.