Solved

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

Posted on 2004-08-11
4
519 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 11

Accepted Solution

by:
sciber_dude earned 500 total points
ID: 11777242
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
ID: 11777317
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
ID: 11777326
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
ID: 11777514
You are welcome sigkappu! Glad it worked out.

:) SD
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Writing lines of code from a form output in script within a results page 2 44
alert(innerHTML); 8 42
Designing forms 3 67
JSON Error in ASP Page 3 36
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 informatio…
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…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

739 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