Solved

How to locate the path of Access db in Map Network Drive location?

Posted on 2011-09-19
3
346 Views
Last Modified: 2012-05-12
Dear EE Experts,

We would like to ask for tech support, this may be related to our previous thread, but here's the case.
We already mapped the network drive where the access db is located, we set it as Drive P:
and inside that drive you'll see the db we need to pull out.
Kindly advise on how to locate it here:
<%
connectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("products.mdb")
      Set myConnection = Server.CreateObject("ADODB.Connection")
--------------------------------------------------------------------------------------------
The location of the web files is different from the location of the db...
Web files are in Drive K:

If I just use that ("products.mdb"), it will show the old db that is INCLUDED on that web files folder...

Please help...
0
Comment
Question by:Stiebel Eltron
[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
3 Comments
 
LVL 4

Expert Comment

by:thewild
ID: 36565324
What your are trying to do is very tricky.
Your ASP pages are executed under a special account (probably ASP.NET account, or IUSR_<servername> account). This account does not see mapped drives, these are only seen by real logged on users.
Furthermore, this not will not have, by default, access to the network share.

You could give the user running ASP scripts the right to access this network share, and change Server.MapPath("products.mdb") to "\\<server name>\<share name>\products.mdb". NOT P:\products.mdb, since this user cannot see mapped drives.

You must understand though that giving this IIS user access to a network share is very bad practice security-wise.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 36565327
Try using the full mapped path instead of Server.MapPath.  See Example Code: http://msdn.microsoft.com/en-us/library/ms524632%28v=vs.90%29.aspx to see why it's not working.
0
 

Author Comment

by:Stiebel Eltron
ID: 36571130
@thewild: sorry but your advise didn't work... I did it already, put the machine name or even its IP, it didn't work...
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

687 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