Solved

How to locate the path of Access db in ASP?

Posted on 2011-09-19
3
271 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
[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
  • 2
3 Comments
 
LVL 83

Accepted Solution

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

622 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