Server.MapPath() error 'ASP 0172 : 80004005'

A

A P

I receive an error like this:
Server.MapPath() error 'ASP 0172 : 80004005'

Invalid Path

/conn.asp, line 2

The Path parameter for the MapPath method must be a virtual path. A physical
path was used.



the conn.asp code :

<%
cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("Z:\AccessDB\access.mdb")
set conn = CreateObject("ADODB.Connection")
conn.open cst
%>

Do I need to locate the mdb file inside the wwwroot? how about enable web
sharing on the Z:\AccessDB, is this required even though I set change
permission on IUSR account?
 
S

Steven Burn

The problem is, you've used a physical path, and not a virtual one, just as
the message says.....

Either remove Server.MapPath(), or change the path to a virtual one.....
--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 
A

A P

i remove server.mapPath() like this:

<%
cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Z:\DB\access.mdb;"
set conn = CreateObject("ADODB.Connection")
conn.open cst
%>

the next error is this:

Microsoft JET Database Engine error '80004005'
Could not find file 'Z:\DB\access.mdb'.

/cn.asp, line 4
 
B

Bob Barrows [MVP]

A said:
I receive an error like this:
Server.MapPath() error 'ASP 0172 : 80004005'

Invalid Path

/conn.asp, line 2

The Path parameter for the MapPath method must be a virtual path. A
physical path was used.



the conn.asp code :

<%
cst = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
Server.MapPath("Z:\AccessDB\access.mdb")
set conn = CreateObject("ADODB.Connection")
conn.open cst
%>

Do I need to locate the mdb file inside the wwwroot? how about enable
web sharing on the Z:\AccessDB, is this required even though I set
change permission on IUSR account?

Is Z a local drive or a mapped drive to a remote machine?

http://www.aspfaq.com/show.asp?id=2009
 
J

Jeff Cochran

See my answer in your other thread. Stick to one thread and pay
attention to the error messages.

Jeff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top