|
Home > Archive > IIS ASP > April 2005 > MapPath Problem
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| TheBob 2005-03-08, 7:52 am |
| I have read all related posts, but still cannot solve my issue.
With my database and asp page in the root folder all works fine.
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.open = Server.MapPath ("BillingQueSlim.mdb")
set rs=Server.CreateObject("ADODB.recordset")
sql="SELECT MEMBERID, MEMBER, ADDRESS, CITY, STATE, ZIP, BILLINGFREQUENCY
FROM Members WHERE MEMBERID = " & strName
'WHERE MEMBERID=" & strName
rs.Open sql, conn
%>
HOWEVER, for security I want the db in the fpdb folder with the asp
remaining in the root.
If I add the subfolder -- i.e., Server.MapPath ("fpdb/BillingQueSlim.mdb")
-- the page returns:
Microsoft JET Database Engine error '80004005'
Could not find file
'E:\kunden\homepages\31\d119399771\fpdb\
billingqueslim.mdb'.
/fpatests/bheader.asp, line 16
I assume that is the physical path on the hosting server. I've tried a
leading slash, back slashes "..", etc. without success.
Can anyone spot the problem?
| |
| Evertjan. 2005-03-08, 5:51 pm |
| =?Utf-8?B?VGhlQm9i?= wrote on 08 mrt 2005 in
microsoft.public.inetserver.asp.general:
> I have read all related posts, but still cannot solve my issue.
> With my database and asp page in the root folder all works fine.
> <%
> set conn=Server.CreateObject("ADODB.Connection")
> conn.Provider="Microsoft.Jet.OLEDB.4.0"
> conn.open = Server.MapPath ("BillingQueSlim.mdb")
> set rs=Server.CreateObject("ADODB.recordset")
> sql="SELECT MEMBERID, MEMBER, ADDRESS, CITY, STATE, ZIP,
> BILLINGFREQUENCY FROM Members WHERE MEMBERID = " & strName
> 'WHERE MEMBERID=" & strName
> rs.Open sql, conn
> %>
>
> HOWEVER, for security I want the db in the fpdb folder with the asp
> remaining in the root.
>
> If I add the subfolder -- i.e., Server.MapPath
> ("fpdb/BillingQueSlim.mdb") -- the page returns:
> Microsoft JET Database Engine error '80004005'
> Could not find file
> 'E:\kunden\homepages\31\d119399771\fpdb\
billingqueslim.mdb'.
> /fpatests/bheader.asp, line 16
> I assume that is the physical path on the hosting server. I've tried a
> leading slash, back slashes "..", etc. without success.
>
> Can anyone spot the problem?
It's all in debugging.
Why not first test the mappath result from the site root?
response.write Server.MapPath("/fpdb/BillingQueSlim.mdb")
response.end
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)
| |
| Shahid Juma 2005-03-08, 5:51 pm |
| Try doing it like this:
Server.MapPath ("../fpdb/BillingQueSlim.mdb")
Shahid
"TheBob" <TheBob@discussions.microsoft.com> wrote in message
news:C270E9C9-417E-48F5-8786-8275FF679DAE@microsoft.com...
> I have read all related posts, but still cannot solve my issue.
> With my database and asp page in the root folder all works fine.
> <%
> set conn=Server.CreateObject("ADODB.Connection")
> conn.Provider="Microsoft.Jet.OLEDB.4.0"
> conn.open = Server.MapPath ("BillingQueSlim.mdb")
> set rs=Server.CreateObject("ADODB.recordset")
> sql="SELECT MEMBERID, MEMBER, ADDRESS, CITY, STATE, ZIP, BILLINGFREQUENCY
> FROM Members WHERE MEMBERID = " & strName
> 'WHERE MEMBERID=" & strName
> rs.Open sql, conn
> %>
>
> HOWEVER, for security I want the db in the fpdb folder with the asp
> remaining in the root.
>
> If I add the subfolder -- i.e., Server.MapPath ("fpdb/BillingQueSlim.mdb")
> -- the page returns:
> Microsoft JET Database Engine error '80004005'
> Could not find file
> 'E:\kunden\homepages\31\d119399771\fpdb\
billingqueslim.mdb'.
> /fpatests/bheader.asp, line 16
> I assume that is the physical path on the hosting server. I've tried a
> leading slash, back slashes "..", etc. without success.
>
> Can anyone spot the problem?
>
>
| |
| Kyle Peterson 2005-04-30, 2:57 am |
| http://www.powerasp.com/content/hin...ysical-path.asp
"TheBob" <TheBob@discussions.microsoft.com> wrote in message
news:C270E9C9-417E-48F5-8786-8275FF679DAE@microsoft.com...
>I have read all related posts, but still cannot solve my issue.
> With my database and asp page in the root folder all works fine.
> <%
> set conn=Server.CreateObject("ADODB.Connection")
> conn.Provider="Microsoft.Jet.OLEDB.4.0"
> conn.open = Server.MapPath ("BillingQueSlim.mdb")
> set rs=Server.CreateObject("ADODB.recordset")
> sql="SELECT MEMBERID, MEMBER, ADDRESS, CITY, STATE, ZIP, BILLINGFREQUENCY
> FROM Members WHERE MEMBERID = " & strName
> 'WHERE MEMBERID=" & strName
> rs.Open sql, conn
> %>
>
> HOWEVER, for security I want the db in the fpdb folder with the asp
> remaining in the root.
>
> If I add the subfolder -- i.e., Server.MapPath ("fpdb/BillingQueSlim.mdb")
> -- the page returns:
> Microsoft JET Database Engine error '80004005'
> Could not find file
> 'E:\kunden\homepages\31\d119399771\fpdb\
billingqueslim.mdb'.
> /fpatests/bheader.asp, line 16
> I assume that is the physical path on the hosting server. I've tried a
> leading slash, back slashes "..", etc. without success.
>
> Can anyone spot the problem?
>
>
|
|
|
|
|