| Author |
Server.MapPath() error 'ASP 0172 : 80004005'
|
|
|
| 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?
| |
| Steven Burn 2004-08-27, 6:16 pm |
| 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 P" <mark@textguru.ph> wrote in message
news:#ylbhOyiEHA.396@TK2MSFTNGP12.phx.gbl...
> 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?
>
>
| |
|
| 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
"Steven Burn" <pvt@noyb.com> wrote in message
news:eDRBVSyiEHA.3664@TK2MSFTNGP11.phx.gbl...
> 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 P" <mark@textguru.ph> wrote in message
> news:#ylbhOyiEHA.396@TK2MSFTNGP12.phx.gbl...
> physical
web[vbcol=seagreen]
>
>
| |
| Steven Burn 2004-08-27, 6:16 pm |
| Is the path to the file correct?
If so, take a look at;
www.connectionstrings.com
--
Regards
Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk
Keeping it FREE!
"A P" <mark@textguru.ph> wrote in message
news:uV2SnYyiEHA.2500@TK2MSFTNGP15.phx.gbl...
> 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
>
>
>
> "Steven Burn" <pvt@noyb.com> wrote in message
> news:eDRBVSyiEHA.3664@TK2MSFTNGP11.phx.gbl...
> as
> web
>
>
| |
| Bob Barrows [MVP] 2004-08-27, 6:16 pm |
| A P wrote:
> 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
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
| |
| Jeff Cochran 2004-08-27, 6:17 pm |
| See my answer in your other thread. Stick to one thread and pay
attention to the error messages.
Jeff
On Thu, 26 Aug 2004 12:36:37 +0800, "A P" <mark@textguru.ph> wrote:
>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
>
>
>
>"Steven Burn" <pvt@noyb.com> wrote in message
>news:eDRBVSyiEHA.3664@TK2MSFTNGP11.phx.gbl...
>as
>web
>
| |
| Aaron [SQL Server MVP] 2004-08-27, 6:17 pm |
| Also see http://www.aspfaq.com/2168
--
http://www.aspfaq.com/
(Reverse address to reply.)
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:u3RTKL1iEHA.3664@TK2MSFTNGP12.phx.gbl...
> A P wrote:
>
> Is Z a local drive or a mapped drive to a remote machine?
>
> http://www.aspfaq.com/show.asp?id=2009
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>
>
| |
|
| Hi Bob/Aaron!
Z is on my local drive.
Mark
"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:OXGvP73iEHA.3320@TK2MSFTNGP11.phx.gbl...
> Also see http://www.aspfaq.com/2168
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
> news:u3RTKL1iEHA.3664@TK2MSFTNGP12.phx.gbl...
>
>
|
|
|
|