?
Solved

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

Posted on 2011-09-19
3
Medium Priority
?
350 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 84

Accepted Solution

by:
Dave Baldwin earned 2000 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

752 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