Forums
This topic is locked
Pure Asp Upload delete
12 Dec 2003 06:35:11 Darren d posted:
Has anyone been able to get a simple file delete to work with a delete behavior attached to a form. I have tried to get Paul Keurs' tutorial (www.dmxzone.com/ShowDetail.asp?NewsId=1938) to work for me, but to no avail. I have followed this example to the letter. Would truly appreciate any heads up. ThanksReplies
Replied 12 Dec 2003 10:47:58
12 Dec 2003 10:47:58 Martha Graham replied:
Check the Pure ASP Upload Add-On Pack. It has the following behaviors:
Delete File(s) Before Record, Delete File(s) Before Update, Renamed Uploaded Files and Mail Uploaded Files.
www.dmxzone.com/go?3331
Martha Graham
DMXzone manager
Delete File(s) Before Record, Delete File(s) Before Update, Renamed Uploaded Files and Mail Uploaded Files.
www.dmxzone.com/go?3331
Martha Graham
DMXzone manager
Replied 14 Dec 2003 00:31:12
14 Dec 2003 00:31:12 stellan karlgren replied:
It´s quite easy to build.
Make a form to delete the record with an hidden field that holds the name of the file.
Insert the delete behavior.
Change this lines:
<b>
' *** Delete Record: construct a sql delete statement and execute it
If (CStr(Request("MM_delete"
) <> "" And CStr(Request("MM_recordId"
) <> ""
Then
' create the sql delete statement
MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the delete
Set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> ""
Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
</b>
To this:
<b>
' *** Delete Record: construct a sql delete statement and execute it
If (CStr(Request("MM_delete"
) <> "" And CStr(Request("MM_recordId"
) <> ""
Then
' create the sql delete statement
MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the delete
Set MM_editCmd = Server.CreateObject("ADODB.Command"
MM_editCmd.ActiveConnection = MM_editConnection
'---------------------------Get the images that will be erased ------------------
Set File = CreateObject("Scripting.FileSystemObject"
ImagePath = Server.MapPath("images"
ImagePath = ImagePath & "/" & request.form("YourImageName"
File.DeleteFile(ImagePath)
'------------------------------------End imagedelete-----------------------------
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> ""
Then
Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
</b>
If it´s more than one image, just repeat.
Regards.
//Stollen, not to good in english.
Make a form to delete the record with an hidden field that holds the name of the file.
Insert the delete behavior.
Change this lines:
<b>
' *** Delete Record: construct a sql delete statement and execute it
If (CStr(Request("MM_delete"



' create the sql delete statement
MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the delete
Set MM_editCmd = Server.CreateObject("ADODB.Command"

MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> ""

Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
</b>
To this:
<b>
' *** Delete Record: construct a sql delete statement and execute it
If (CStr(Request("MM_delete"



' create the sql delete statement
MM_editQuery = "delete from " & MM_editTable & " where " & MM_editColumn & " = " & MM_recordId
If (Not MM_abortEdit) Then
' execute the delete
Set MM_editCmd = Server.CreateObject("ADODB.Command"

MM_editCmd.ActiveConnection = MM_editConnection
'---------------------------Get the images that will be erased ------------------
Set File = CreateObject("Scripting.FileSystemObject"

ImagePath = Server.MapPath("images"

ImagePath = ImagePath & "/" & request.form("YourImageName"

File.DeleteFile(ImagePath)
'------------------------------------End imagedelete-----------------------------
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close
If (MM_editRedirectUrl <> ""

Response.Redirect(MM_editRedirectUrl)
End If
End If
End If
</b>
If it´s more than one image, just repeat.
Regards.
//Stollen, not to good in english.
Replied 14 Dec 2003 05:44:01
14 Dec 2003 05:44:01 Darren d replied:
I have purchased the add on pack but sadly its not working.
Replied 14 Dec 2003 08:35:03
14 Dec 2003 08:35:03 Jeremy Conn replied:
Interesting... I own it and have never had any problems with it.
<b>Connman21</b>
www.conncreativemedia.com
<b>DEVELOPMENT SETUP</b>
DW MX Studio
Web Server: IIS5
DB: Access2000/SQL2000
OS: XP Pro
Language: ASP/VB
<b>Connman21</b>
www.conncreativemedia.com
<b>DEVELOPMENT SETUP</b>
DW MX Studio
Web Server: IIS5
DB: Access2000/SQL2000
OS: XP Pro
Language: ASP/VB
Replied 15 Dec 2003 00:01:10
15 Dec 2003 00:01:10 Darren d replied:
I am sure that you have more knowledge than myself in this dept. connman21 however your comment doesn't help me at all.
Edited by - dhere38 on 15 Dec 2003 00:03:30
Edited by - dhere38 on 15 Dec 2003 00:46:22
Edited by - dhere38 on 15 Dec 2003 00:03:30
Edited by - dhere38 on 15 Dec 2003 00:46:22
Replied 15 Dec 2003 11:11:35
15 Dec 2003 11:11:35 Martha Graham replied:
Please send your pages with details to
Give details on what you are trying to create and what is not working.
Martha Graham
DMXzone manager
Give details on what you are trying to create and what is not working.
Martha Graham
DMXzone manager
Replied 15 Dec 2003 21:03:56
15 Dec 2003 21:03:56 Jeremy Conn replied:
My comment was meant to state that the extension works fine. When all you say is "It doesn't work" that implies something is wrong with the tool, when in actuality the issue is instead with your use of it.
The more details the better... this forum is better used as a answer and fix utility, as opposed to a "show me how to do" tutorial center.
Good luck.
<b>Connman21</b>
www.conncreativemedia.com
<b>DEVELOPMENT SETUP</b>
DW MX Studio
Web Server: IIS5
DB: Access2000/SQL2000
OS: XP Pro
Language: ASP/VB
The more details the better... this forum is better used as a answer and fix utility, as opposed to a "show me how to do" tutorial center.
Good luck.
<b>Connman21</b>
www.conncreativemedia.com
<b>DEVELOPMENT SETUP</b>
DW MX Studio
Web Server: IIS5
DB: Access2000/SQL2000
OS: XP Pro
Language: ASP/VB