Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

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 would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

885 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