sigkappu
asked on
Using Server.MapPath to connect to Database outside of root website folder
I am trying to use Server.MapPath to link to a database located in the folder located at C:/inetpub/wwwroot/interna l_genesis/ access/Gen esis Accounts.mdb from a page located at C:/indetpub/wwwroot/extern al_genesis /dologin.a sp. I can not get it to see the database. What is the syntax that I need to be using to get to that database?
I have tried Server.MapPath("C:/inetpub /wwwroot/i nternal_ge nesis/acce ss/Genesis Accounts.mdb") and Server.MapPath("../interna l_genesis/ access/Gen esis Accounts.mdb")
Thanks for your help
I have tried Server.MapPath("C:/inetpub
Thanks for your help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
you can do this instead:
<%
set conn=Server.CreateObject(" ADODB.Conn ection")
conn.Provider="Microsoft.J et.OLEDB.4 .0"
conn.Open "C:/inetpub/wwwroot/intern al_genesis /access/Ge nesis Accounts.mdb"
%>
It
<%
set conn=Server.CreateObject("
conn.Provider="Microsoft.J
conn.Open "C:/inetpub/wwwroot/intern
%>
It
You are welcome sigkappu! Glad it worked out.
:) SD
:) SD
ASKER
use this directly... (without Server.MapPath)
"C:/inetpub/wwwroot/intern
Thanks
SD