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

x
?
Solved

How to locate the path of Access db in ASP?

Posted on 2011-09-19
3
Medium Priority
?
275 Views
Last Modified: 2012-06-27
Dear EE Experts,

We would like to ask for tech support on how to locate the path of our access db that is located on this location (\\10.100.128.149\photo).
In whereas the location of the web is located to another server machine.

Please see the attached code...

Hope to hear soon...
<%
connectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("\\10.100.128.149\photo\products.mdb")
	Set myConnection = Server.CreateObject("ADODB.Connection")
	Set rsProducts = Server.CreateObject("ADODB.Recordset")
SeriesID = request.QueryString("SeriesID")
myConnection.Open connectString
sqlContent = "SELECT ID, Series, iPhoto, SeriesID, Type, Remarks, iDownload FROM Products WHERE SeriesID ="&Seriesid
Set rsProducts = myConnection.Execute(sqlContent)
%>

Open in new window

0
Comment
Question by:Stiebel Eltron
  • 2
3 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 2000 total points
ID: 36558654
You can't use "Server.MapPath" because that creates a full path on the local server.  Try it without it.

connectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\10.100.128.149\photo\products.mdb"

You may run into the problem of requiring read/write access to the *.mdb.  It must be located on a 'network file share' with appropriate permissions so you may have to make that a 'mapped drive'.  http://support.microsoft.com/kb/303528
0
 

Author Comment

by:Stiebel Eltron
ID: 36558679
I see, so it's not possible to pull-out from different machine without mapping out the network drive?
0
 

Author Closing Comment

by:Stiebel Eltron
ID: 36558720
Great!
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

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.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Suggested Courses

824 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