Solved

Using Server.MapPath to connect to Database outside of root website folder

Posted on 2004-08-11
4
492 Views
Last Modified: 2008-02-01
I am trying to use Server.MapPath to link to a database located in the folder located at C:/inetpub/wwwroot/internal_genesis/access/Genesis Accounts.mdb  from a page located at C:/indetpub/wwwroot/external_genesis/dologin.asp.  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/internal_genesis/access/Genesis Accounts.mdb") and Server.MapPath("../internal_genesis/access/Genesis Accounts.mdb")

 Thanks for your help
0
Comment
Question by:sigkappu
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
sciber_dude earned 500 total points
Comment Utility
C:/inetpub/wwwroot/internal_genesis/access/Genesis Accounts.mdb
C:/inetpub/wwwroot/external_genesis/dologin.asp

Use either
Server.MapPath("../internal_genesis/access/Genesis Accounts.mdb")

OR use this directly... (without Server.MapPath)
"C:/inetpub/wwwroot/internal_genesis/access/Genesis Accounts.mdb"

:) SD
0
 

Author Comment

by:sigkappu
Comment Utility
I'm using this one now:

use this directly... (without Server.MapPath)
"C:/inetpub/wwwroot/internal_genesis/access/Genesis Accounts.mdb"

Thanks
SD
0
 
LVL 1

Expert Comment

by:buff_butler
Comment Utility
you can do this instead:

<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "C:/inetpub/wwwroot/internal_genesis/access/Genesis Accounts.mdb"
%>

It
0
 
LVL 11

Expert Comment

by:sciber_dude
Comment Utility
You are welcome sigkappu! Glad it worked out.

:) SD
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now