Server.MapPath Error ?

Results 1 to 2 of 2

Thread: Server.MapPath Error ?

  1. #1
    Join Date
    Dec 1969

    Default Server.MapPath Error ?

    I am getting the following error, can someone explain how I can fix this please ?<BR><BR>Server.MapPath() error &#039ASP 0172 : 80004005&#039 <BR><BR>Invalid Path <BR><BR>The Path parameter for the MapPath method must be a virtual path. A physical path was used. <BR><BR>I am using the following code to connect to the Database:<BR><BR>&#060;%@ LANGUAGE="VBSCRIPT" %&#062;<BR>&#060;% Option Explicit %&#062;<BR>&#060;% <BR>Dim DATA_PATH, objDC, objRS, email, user, pass, sendmail<BR>DATA_PATH=Server.Mappath("c:/InetPub/wwwroot/userlogon/MyData.mdb")<BR>Set objDC = Server.CreateObject("ADODB.Connection")<BR>objDC.C onnectionTimeout = 15<BR>objDC.CommandTimeout = 30<BR>objDC.Open "DBQ=" & DATA_PATH & _<BR> ";Driver={Microsoft Access Driver (*.mdb)}; " & _<BR> "DriverId=25;MaxBufferSize=8192;Threads=20;", _<BR> "admin", "password"<BR>Set objRS = Server.CreateObject("ADODB.Recordset")<BR>email=re quest.form("email")<BR><BR>objRS.Open "SELECT * FROM tblUSR WHERE name = &#039" & _<BR> name & "&#039", objDC, 0, 1<BR>%&#062;<BR><BR>

  2. #2
    Helper Matt Guest

    Default RE: Server.MapPath Error ?

    All You Have TO Do Is:<BR><BR>CHANGE THIS:<BR><BR>DATA_PATH=Server.Mappath("c:/InetPub/wwwroot/userlogon/MyData.mdb")<BR><BR>TO THIS:<BR><BR>DATA_PATH=Server.Mappath("MyData.mdb" )<BR><BR>OR<BR><BR>DATA_PATH=c:/InetPub/wwwroot/userlogon/MyData.mdb<BR>WHICH DOES NOT USE SERVER.MAPPATH<BR><BR>But I&#039m Not To Sure Because I Don&#039t Use Server.Mappath.<BR><BR>MATT

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts