Solved

How to locate the path of Access db in ASP?

Posted on 2011-09-19
3
265 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 82

Accepted Solution

by:
Dave Baldwin earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
Great!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now