|
 |
asp_databases thread: Re: Error while using FSO deletefile method
Message #1 by "Vincent Vandermeeren \(mailinglists Only\)" <vinnie@j...> on Sat, 6 Jul 2002 08:42:26 +0200
|
|
If you do a prinout of the path is that correct ?
Does the Iuser also has rights to delete ??
I hope this can help ...
Greetings,
Vinnie
----- Original Message -----
From: "Chirag Shah" <chiragiit@y...>
To: "ASP Databases" <asp_databases@p...>
Sent: Saturday, July 06, 2002 2:10 AM
Subject: [asp_databases] Re: Error while using FSO deletefile method
> I did go through this knowledge base article and I also used
> server.mappath method() still there is a problem.
>
> Hope any one can help..?
>
>
>
Message #2 by "Chirag Shah" <chiragiit@y...> on Sat, 6 Jul 2002 16:49:19
|
|
Yes,
IUSER_machine name has "write" permissiion on "data" folder. and
response.write (Path) is displaying actual physical path of the file on
the server..
using FSO is a pain..?
Message #3 by "Chirag Shah" <chiragiit@y...> on Sat, 6 Jul 2002 02:10:14
|
|
I did go through this knowledge base article and I also used
server.mappath method() still there is a problem.
Hope any one can help..?
Message #4 by "Chirag Shah" <chiragiit@y...> on Fri, 5 Jul 2002 22:25:07
|
|
Complete Physical path of the PDF file is:
"d:\webs\bdntte\billing\data\pdffiles\f1040ez.pdf"
I am getting this error while using File system object deletefile method
Microsoft VBScript runtime error '800a0035'
File not found
/billing/deletePDF.asp, line 13
below is my code:
-------------------------------------------------------------------------
<%@ Language=VBScript %>
<%
Dim Id,Path,strSQL,filename
ID = Request.QueryString("Primkey")
filename = Request.QueryString("filename")
strSQL = "delete * from PDF where ID= =" & ID & ";"
Path = Server.MapPath("data\pdffiles\")
Path = Path & "\" & filename
Response.Write (path)
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile (path)
Dim ObjConn
Set ObjConn = Server.CreateObject("ADODB.connection")
ObjConn.Open ("DSN=bdntte.time; UID= ; PWD=SHJ11")
ObjConn.Execute "strSQL"
ObjConn.Close
Set Objconn = Nothing
%>
------------------------------------------------------------------
Message #5 by "Vincent Vandermeeren \(mailinglists Only\)" <vinnie@j...> on Fri, 5 Jul 2002 23:27:03 +0200
|
|
Hi Chirag Shah,
check this out !!
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q276011
Greetings,
Vinnie
----- Original Message -----
From: "Chirag Shah" <chiragiit@y...>
To: "ASP Databases" <asp_databases@p...>
Sent: Friday, July 05, 2002 10:25 PM
Subject: [asp_databases] Error while using FSO deletefile method
> Complete Physical path of the PDF file is:
> "d:\webs\bdntte\billing\data\pdffiles\f1040ez.pdf"
>
> I am getting this error while using File system object deletefile method
>
>
>
>
> Microsoft VBScript runtime error '800a0035'
>
> File not found
>
> /billing/deletePDF.asp, line 13
>
>
> below is my code:
> -------------------------------------------------------------------------
> <%@ Language=VBScript %>
> <%
> Dim Id,Path,strSQL,filename
> ID = Request.QueryString("Primkey")
> filename = Request.QueryString("filename")
> strSQL = "delete * from PDF where ID= =" & ID & ";"
> Path = Server.MapPath("data\pdffiles\")
> Path = Path & "\" & filename
> Response.Write (path)
>
> Dim objFSO
> Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
> objFSO.DeleteFile (path)
>
> Dim ObjConn
> Set ObjConn = Server.CreateObject("ADODB.connection")
> ObjConn.Open ("DSN=bdntte.time; UID= ; PWD=SHJ11")
> ObjConn.Execute "strSQL"
>
> ObjConn.Close
> Set Objconn = Nothing
> %>
> ------------------------------------------------------------------
>
Message #6 by "Drew, Ron" <RDrew@B...> on Mon, 8 Jul 2002 09:27:58 -0400
|
|
What does your response.write look like???
Try doing this at the response.write of Path in your script
Response.Write("The location of this page is:<br>")
Response.Write(Request.ServerVariables("PATH_TRANSLATED"))
Response.Write("The location of my root directory is:<br>")
Response.Write(Server.MapPath("\"))
Response.Write Path
-----Original Message-----
From: Chirag Shah [mailto:chiragiit@y...]
Sent: Friday, July 05, 2002 6:25 PM
To: ASP Databases
Subject: [asp_databases] Error while using FSO deletefile method
Complete Physical path of the PDF file is:
"d:\webs\bdntte\billing\data\pdffiles\f1040ez.pdf"
I am getting this error while using File system object deletefile method
Microsoft VBScript runtime error '800a0035'
File not found
/billing/deletePDF.asp, line 13
below is my code:
------------------------------------------------------------------------
-
<%@ Language=3DVBScript %>
<%
Dim Id,Path,strSQL,filename
ID =3D Request.QueryString("Primkey")
filename =3D Request.QueryString("filename")
strSQL =3D "delete * from PDF where ID=3D =3D" & ID & ";"
Path =3D Server.MapPath("data\pdffiles\")
Path =3D Path & "\" & filename
Response.Write (path)
Dim objFSO
Set objFSO =3D Server.CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile (path)
Dim ObjConn
Set ObjConn =3D Server.CreateObject("ADODB.connection")
ObjConn.Open ("DSN=3Dbdntte.time; UID=3D ; PWD=3DSHJ11") ObjConn.Execute
"strSQL"
ObjConn.Close
Set Objconn =3D Nothing
%>
------------------------------------------------------------------
Message #7 by "Chirag Shah" <chiragiit@y...> on Mon, 8 Jul 2002 14:51:24
|
|
I got it working Thanks any way
Below is the code
-------------------------------------------------------
<%@ Language=VBScript %>
<%
Dim Id,Path,strSQL,filename
ID = Request.QueryString("Primkey")
strSQL = "delete * from PDF where ID= " & ID & ";"
Path = Server.MapPath("../data/pdffiles/"& Request.QueryString("filename"))
Dim objFSO
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile (path)
Dim ObjConn
Set ObjConn = Server.CreateObject("ADODB.connection")
ObjConn.Open ("DSN=bdntte.time; UID= ; PWD=SHJ11")
ObjConn.Execute strSQL
ObjConn.Close
Set Objconn = Nothing
Response.Redirect "customers.asp"
%>
-----------------------------------------------------------------
|
|
 |