Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2004-08-11
4
Medium Priority
?
533 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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

721 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