Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to locate the path of Access db in ASP?

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

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

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…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
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…

705 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